You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Fix crash in CodeEdit when caret column exceeds line length.
This commit is contained in:
@@ -2899,6 +2899,7 @@ void CodeEdit::_filter_code_completion_candidates_impl() {
|
|||||||
const int caret_line = get_caret_line();
|
const int caret_line = get_caret_line();
|
||||||
const int caret_column = get_caret_column();
|
const int caret_column = get_caret_column();
|
||||||
const String line = get_line(caret_line);
|
const String line = get_line(caret_line);
|
||||||
|
ERR_FAIL_INDEX_MSG(caret_column - 1, line.length(), "Caret column exceeds line length.");
|
||||||
|
|
||||||
if (caret_column > 0 && line[caret_column - 1] == '(' && !code_completion_forced) {
|
if (caret_column > 0 && line[caret_column - 1] == '(' && !code_completion_forced) {
|
||||||
cancel_code_completion();
|
cancel_code_completion();
|
||||||
|
|||||||
Reference in New Issue
Block a user