Sort non-scope autocompletion results by locality
commit4f45f7014b3e7aabf650a68153ea38db4ffc5fcb
authorJiří Techet <techet@gmail.com>
Sun, 24 Apr 2022 17:32:59 +0000 (24 19:32 +0200)
committerThomas Martitz <thomas.martitz@mailbox.org>
Sat, 27 Aug 2022 22:44:50 +0000 (28 00:44 +0200)
tree3b31a01a0c892e13f7bd9214310338b0ff3601cd
parent2a5da2225f7aa87bdc7f82c3966f6fb32754ae5c
Sort non-scope autocompletion results by locality

To present more relevant results at the top of the list, sort them in
the following order:

local variables
tags from current file
workspace tags
global tags

and alphabetically within a single group.

In addition, we need to remove duplicates from the list of displayed names.

Finally, since the entries are not sorted alphabetically, we need to call

SSM(sci, SCI_AUTOCSETORDER, SC_ORDER_CUSTOM, 0);

so Scintilla knows it shouldn't sort the list alphabetically.
src/editor.c
src/tagmanager/tm_workspace.c