소스 검색

Merge pull request #5539 from vnen/fix-completion-crash

Fix completion string check when column = 0
Rémi Verschelde 9 년 전
부모
커밋
576a28470f
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;
 	}