IIRC there are flags that autocomplete and/or calltip is shown, do any of those need to be cleared when they are cancelled?
Good point, I've been fighting this in the last couple of days in the (not-yet-ready-to-be-published-but-soon-hopefully) LSP plugin.
For the calltip, there's no Scintilla notification informing that it got hidden so we can't even track its status and set some flags based on it (such a notification would be useful though, I'll try to ask Neil if it could be added).
For the autocomplete popup, there is `SCN_AUTOCCANCELLED` where `autocomplete_scope_shown` is set to FALSE. Unfortunately, this notification is a little strange and is only fired when the user cancels the popup (e.g. using escape) but isn't delivered when the popup disappears because the written word isn't in the autocompletion list any more. So we'd better not rely on it much (and add a fat comment under `SCN_AUTOCCANCELLED`). Fortunately, the `autocomplete_scope_shown` variable is more like ``` the_previous_autocomplete_popup_was_for_scope_autocompletion_and_not_for_normal_autocompletion ``` and it doesn't matter whether it's shown or not.
So I think in general this patch should be OK. Anyway, when playing with the LSP plugin I couldn't resist and rewrote the calltip code a bit because right now it doesn't re-appear when it should.