Explorar o código

Merge pull request #17314 from robfram/complete-path-15813

Fix bad autocomplete of partially written node paths when using syntactic sugar notation ($)
Rémi Verschelde %!s(int64=7) %!d(string=hai) anos
pai
achega
88c1430613
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      scene/gui/text_edit.cpp

+ 1 - 1
scene/gui/text_edit.cpp

@@ -5238,7 +5238,7 @@ void TextEdit::_update_completion_candidates() {
 
 
 	} else {
 	} else {
 
 
-		while (cofs > 0 && l[cofs - 1] > 32 && _is_completable(l[cofs - 1])) {
+		while (cofs > 0 && l[cofs - 1] > 32 && (l[cofs - 1] == '/' || _is_completable(l[cofs - 1]))) {
 			s = String::chr(l[cofs - 1]) + s;
 			s = String::chr(l[cofs - 1]) + s;
 			if (l[cofs - 1] == '\'' || l[cofs - 1] == '"' || l[cofs - 1] == '$')
 			if (l[cofs - 1] == '\'' || l[cofs - 1] == '"' || l[cofs - 1] == '$')
 				break;
 				break;