From 9285bf2d42723d21c9af19de3c353b0e20703fb6 Mon Sep 17 00:00:00 2001 From: mpheath Date: Mon, 6 Feb 2023 14:35:33 +1000 Subject: [PATCH] Fix missing items in word autocomplete Word autocomplete change from case sensitive search to variable search based on _ignoreCase unless language type is text. This allows text documents to retain case sensitive search to respect typed case as the issue only affects case insensitive Data/Programming languages. If normal.xml exist in the autocomplete folder then xml defaults apply for text so would be case insensitive by default unless overridden by the xml setting . Fix #13060, close #13062 --- PowerEditor/src/ScintillaComponent/AutoCompletion.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PowerEditor/src/ScintillaComponent/AutoCompletion.cpp b/PowerEditor/src/ScintillaComponent/AutoCompletion.cpp index 100c982ea..62f83ed5f 100644 --- a/PowerEditor/src/ScintillaComponent/AutoCompletion.cpp +++ b/PowerEditor/src/ScintillaComponent/AutoCompletion.cpp @@ -458,7 +458,10 @@ void AutoCompletion::getWordArray(vector & wordArray, TCHAR *beg size_t docLength = _pEditView->execute(SCI_GETLENGTH); - int flags = SCFIND_WORDSTART | SCFIND_MATCHCASE | SCFIND_REGEXP | SCFIND_POSIX; + int flags = SCFIND_WORDSTART | SCFIND_REGEXP | SCFIND_POSIX; + + if (!_ignoreCase || (!_funcCompletionActive && _curLang == L_TEXT)) + flags |= SCFIND_MATCHCASE; _pEditView->execute(SCI_SETSEARCHFLAGS, flags); intptr_t posFind = _pEditView->searchInTarget(expr.c_str(), expr.length(), 0, docLength);