From 484f4d8dec3ad1f08a3a5d36d6eb59cdfd9ad7d8 Mon Sep 17 00:00:00 2001 From: Paulb23 Date: Wed, 29 Jun 2016 14:07:11 +0100 Subject: Fixed function highlighting with spaces --- scene/gui/text_edit.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scene') diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 6fd6137ac8..ca8284cb13 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -852,6 +852,11 @@ void TextEdit::_notification(int p_what) { k++; } + // check for space between name and bracket + while (k < str.length() && (str[k] == '\t' || str[k] == ' ')) { + k++; + } + if (str[k] == '(') { in_function_name = true; } -- cgit v1.2.3