Merge pull request #111597 from HolonProduction/code-edit-dirty-flag

CodeEdit: Use flag to recalculate characteristics
This commit is contained in:
Thaddeus Crews
2025-11-10 08:20:22 -06:00
4 changed files with 9 additions and 5 deletions

View File

@ -3672,6 +3672,7 @@ void CodeEdit::_filter_code_completion_candidates_impl() {
for (ScriptLanguage::CodeCompletionOption &option : code_completion_option_sources) {
option.matches.clear();
option.matches_dirty = true;
if (single_quote && option.display.is_quoted()) {
option.display = option.display.unquote().quote("'");
}
@ -3757,6 +3758,7 @@ void CodeEdit::_filter_code_completion_candidates_impl() {
// go through all possible matches to get the best one as defined by CodeCompletionOptionCompare
if (all_possible_subsequence_matches.size() > 0) {
option.matches = all_possible_subsequence_matches[0];
option.matches_dirty = true;
option.get_option_characteristics(string_to_complete);
all_possible_subsequence_matches = all_possible_subsequence_matches.slice(1);
if (all_possible_subsequence_matches.size() > 0) {
@ -3765,6 +3767,7 @@ void CodeEdit::_filter_code_completion_candidates_impl() {
compared_option.clear_characteristics();
for (Vector<Pair<int, int>> &matches : all_possible_subsequence_matches) {
compared_option.matches = matches;
compared_option.matches_dirty = true;
compared_option.get_option_characteristics(string_to_complete);
if (compare(compared_option, option)) {
option = compared_option;