[Geany-devel] Calltip and autocomplete interaction

Lex Trotman elextr at xxxxx
Fri Jul 24 11:42:03 UTC 2009

Hi Enrico,

Tested with r4023 seems to work fine now, thanks. :-D

2009/7/24 Enrico Tröger <enrico.troeger at uvena.de>:
> On Fri, 24 Jul 2009 12:42:42 +1000, Lex wrote:
>>Hi Guys,
>>When typing a function call, the calltip is shown when the '(' is
>>typed.  It is then replaced by autocomplete suggestions as the
>>parameter is typed.  If the autocomplete is accepted then the calltip
>>is re-displayed, but if the autocomplete is not accepted, such as by
>>typing ',' then the tooltip is not re-displayed, very annoying.  I
>>know I can re-display it manually by twisting my fingers into a knot
>>;-) but automatic would be better.
> You know you can re-configure the keybinding for showing calltips :)

Yeah, but running out of keycodes, too many functions in Geany ;-)
anyway don't need to now :-)

>>AFAICT the editor.c code intends to re-display it but I can't see why
>>it doesn't work in this case.
> Yeah :(.
> It's in src/editor.c at handling the SCN_AUTOCCANCELLED notification.
> I think the problem was that we passed a reference to the
> SCNotification struct to the idle function but at the time that
> idle function was called, the SCNotification struct was not valid
> anymore because most likely other Scintilla messages have been arrived
> and so the struct contained other or invalid information for this
> operation. So, in SVN r4021 I changed the code so that it caches the
> necessary information (nt->lParam and nt->text) and pass the cached
> information to the idle function. And it seems, now it works only with
> a real idle function and not a 50ms timeout which was very ugly.
> Quick testing has shown it seems to work but I'm not that sure, so
> please test.
> Update: while re-reading your initial report and re-testing, it still
> doesn't work if you cancel the auto-completion list by typing an
> invalid character (invalid in terms of a non-matching item). For this
> to work, we would need to explicitly reshow the calltip also when
> receiving SCN_CHARADDED. Right now, I'm not sure whether it can/should
> do this unconditionally or whether we need some logic behind when to
> reshow the calltip (of course, the basic condition is only reshow it
> when it was shown before :D).
> Anyway, reshowing the calltip after a cancelled auto-completion list
> should work pretty good now when closing the list with Escape so that
> we really receive a SCN_AUTOCCANCELLED message.
>>Also I noticed that the manual doesn't describe symbol autocompletion
>>operation and the keycodes for accept and dismiss.  It does for
>>snippets, but not for symbol autocomplete.
> You mean Enter/Tab to accept an item and Escape to cancel an
> auto-completion list?

Yeah, I could see where the snippets section talks about its
autocomplete, but not symbol autocomplete.
In fact the only mention of symbol autocomplete, besides in the list
of features on page 1, seems to be buried in the tags section and
nothing about how its UI works.
And I only found that reference by searching the document for "auto"
when I was trying to check that I understood how it should work before
I reported the bug.

> Regards,
> Enrico
> --
> Get my GPG key from http://www.uvena.de/pub.asc
> _______________________________________________
> Geany-devel mailing list
> Geany-devel at uvena.de
> http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel

More information about the Devel mailing list