[Github-comments] [geany/geany] Enable local variables for C/C++ and improve autocompletion (PR #3185)

elextr notifications at github.com
Sun May 1 00:32:17 UTC 2022


@elextr commented on this pull request.



> @@ -601,6 +601,7 @@ static void show_autocomplete(ScintillaObject *sci, gsize rootlen, GString *word
 	}
 	/* store whether a calltip is showing, so we can reshow it after autocompletion */
 	calltip.set = (gboolean) SSM(sci, SCI_CALLTIPACTIVE, 0, 0);
+	SSM(sci, SCI_AUTOCSETORDER, SC_ORDER_CUSTOM, 0);

A quick scan of the code suggests Scintilla makes the index in all cases, but only sorts it in the `SC_ORDER_CUSTOM` case, so the sort is the extra cost.  Then as @techee said it binary searches the index for the selection each time you type, so when we passed `SC_ORDER_PRESORTED` by leaving the default it was binary searching an unsorted index and that gives undefined results, which is probably why @techee didn't see it and I did.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3185#discussion_r862408529
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/3185/review/958529672 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20220430/0149842f/attachment.htm>


More information about the Github-comments mailing list