浏览代码

Fix completion string check when column = 0

George Marques 9 年之前
父节点
当前提交
55b8a353f5
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scene/gui/text_edit.cpp

+ 1 - 1
scene/gui/text_edit.cpp

@@ -4122,7 +4122,7 @@ void TextEdit::_update_completion_candidates() {
 		}
 		}
 	}
 	}
 
 
-	if (l[cursor.column - 1] == '(' && !pre_keyword && !completion_strings[0].begins_with("\"")) {
+	if (cursor.column > 0 && l[cursor.column - 1] == '(' && !pre_keyword && !completion_strings[0].begins_with("\"")) {
 		cancel = true;
 		cancel = true;
 	}
 	}