@pilaGit The Notepad++ sorting seems to align with the Scintilla library sorting that Notepad++ uses for the autocomplete.
PythonScript example to test:
def main(): def check_order(): order = editor.autoCGetOrder() if order != 1: print('autoCGetOrder:', order) # Scintilla to do the sort order. editor.autoCSetOrder(1) order = editor.autoCGetOrder() print('autoCGetOrder:', order) text = editor.getText() words = text.split() itemList = ' '.join(words) print("py_sorted:", sorted(words, key=str.upper))) print("words:", words) print("itemList:", itemList) check_order() print('autoCShow') editor.autoCShow(0, itemList) main()Document:
četiri dva ajde tri jedan ćevap đurđa žuži šestImage of 1st run showing the autocomplete:
autoc_ps_sort.png
Scintilla internally sorted the autocomplete list instead of Notepad++ in this test.
This is not focusing about how the sort is done that I mention. It’s about the current sort is aligned between the Notepad++ sort and the Scintilla sort. If not aligned then unpredictable bad working behavior occurs with the autocomplete.
For how the sort is done, the change of sort algorithm would require change in both Notepad++ and the Scintilla library to remain aligned for good working behavior. There is a custom sort SC_ORDER_CUSTOM though means extra work to create an index … and extra processing is usually avoided if possible to prevent excessive lag with the editor.