Fix auto-completion sort order problem due to fx icon

Fix #11233, close #11234
This commit is contained in:
VinsWorldcom 2022-02-17 15:19:18 -05:00 committed by Don Ho
parent efcb3d0472
commit 80ba58773d
1 changed files with 3 additions and 3 deletions

View File

@ -119,10 +119,10 @@ bool AutoCompletion::showApiComplete()
if (!_isFxImageRegistered) if (!_isFxImageRegistered)
{ {
_pEditView->execute(SCI_AUTOCSETTYPESEPARATOR, WPARAM('?'));
_pEditView->execute(SCI_REGISTERIMAGE, FUNC_IMG_ID, LPARAM(xpmfn)); _pEditView->execute(SCI_REGISTERIMAGE, FUNC_IMG_ID, LPARAM(xpmfn));
_isFxImageRegistered = true; _isFxImageRegistered = true;
} }
_pEditView->execute(SCI_AUTOCSETTYPESEPARATOR, WPARAM('\x1E'));
_pEditView->execute(SCI_AUTOCSETSEPARATOR, WPARAM(' ')); _pEditView->execute(SCI_AUTOCSETSEPARATOR, WPARAM(' '));
_pEditView->execute(SCI_AUTOCSETIGNORECASE, _ignoreCase); _pEditView->execute(SCI_AUTOCSETIGNORECASE, _ignoreCase);
_pEditView->showAutoComletion(curPos - startPos, _keyWords.c_str()); _pEditView->showAutoComletion(curPos - startPos, _keyWords.c_str());
@ -201,10 +201,10 @@ bool AutoCompletion::showApiAndWordComplete()
// Make Scintilla show the autocompletion menu // Make Scintilla show the autocompletion menu
if (!_isFxImageRegistered) if (!_isFxImageRegistered)
{ {
_pEditView->execute(SCI_AUTOCSETTYPESEPARATOR, WPARAM('?'));
_pEditView->execute(SCI_REGISTERIMAGE, FUNC_IMG_ID, LPARAM(xpmfn)); _pEditView->execute(SCI_REGISTERIMAGE, FUNC_IMG_ID, LPARAM(xpmfn));
_isFxImageRegistered = true; _isFxImageRegistered = true;
} }
_pEditView->execute(SCI_AUTOCSETTYPESEPARATOR, WPARAM('\x1E'));
_pEditView->execute(SCI_AUTOCSETSEPARATOR, WPARAM(' ')); _pEditView->execute(SCI_AUTOCSETSEPARATOR, WPARAM(' '));
_pEditView->execute(SCI_AUTOCSETIGNORECASE, _ignoreCase); _pEditView->execute(SCI_AUTOCSETIGNORECASE, _ignoreCase);
_pEditView->showAutoComletion(curPos - startPos, words.c_str()); _pEditView->showAutoComletion(curPos - startPos, words.c_str());
@ -965,7 +965,7 @@ bool AutoCompletion::setLanguage(LangType language)
for (; funcNode; funcNode = funcNode->NextSiblingElement(TEXT("KeyWord")) ) for (; funcNode; funcNode = funcNode->NextSiblingElement(TEXT("KeyWord")) )
{ {
const TCHAR *name = funcNode->Attribute(TEXT("name")); const TCHAR *name = funcNode->Attribute(TEXT("name"));
generic_string imgid = TEXT("?") + intToString(FUNC_IMG_ID); generic_string imgid = TEXT("\x1E") + intToString(FUNC_IMG_ID);
if (name) if (name)
{ {
size_t len = lstrlen(name); size_t len = lstrlen(name);