Hey,
I think I found a bug. If you have a struct completition list open (e.g. after typing the dot after foo where foo is an instance of a struct) you normally get a completion list with only the members. If you then type further until you typed the number of characters needed for the normal list, then the normal list pops up (the one which has all sorts of stuffs like functions etc) and the struct-specific one is destroyed.
I think this is a bug because the current code tries to proted the struct-list.
I have a proposed fix in my git repo, you can see it here: http://repo.or.cz/w/geany-mirror/kugel-geany.git/commit/e6a4fd1ad407d9c07bf9...
The problem seems to be that it only checks for an open list for the tag completion, not for the "documents' words" one. Also, the check before the tag completion list seems wrong too so I fixed it.
With that patch, everything works alright again for me.
Best regards.
On Sat, 17 Apr 2010 18:02:19 +0200, Thomas wrote:
Hey,
I think I found a bug. If you have a struct completition list open (e.g. after typing the dot after foo where foo is an instance of a struct) you normally get a completion list with only the members. If you then type further until you typed the number of characters needed for the normal list, then the normal list pops up (the one which has all sorts of stuffs like functions etc) and the struct-specific one is destroyed.
I think this is a bug because the current code tries to proted the struct-list.
I have a proposed fix in my git repo, you can see it here: http://repo.or.cz/w/geany-mirror/kugel-geany.git/commit/e6a4fd1ad407d9c07bf9...
Looks good to me. Anyway, could you provide a simple test case to verify the old and new behaviour? I tried but all my attempts worked (that doesn't mean much only that my test cases were wrong :D).
Regards, Enrico
Am 18.04.2010 10:53, schrieb Enrico Tröger:
Looks good to me. Anyway, could you provide a simple test case to verify the old and new behaviour? I tried but all my attempts worked (that doesn't mean much only that my test cases were wrong :D).
Let's try.
struct foo { ... int my_member; ... } bar;
void my_function() {};
Now, if I type "bar." a list pops up with only the members of the Foo struct - which is fine (so my_function is not in that list). But if you then type further, to "bar.my_" the list is destroyed and a new pops which doesn't only contain the struct members, but also my_function (and in fact all other my_* functions, defines, etc).
Best regards.
Alright, my first attempt introduced a regression, so I updated my git repo with another proposed fix (http://repo.or.cz/w/geany-mirror/kugel-geany.git/commit/ac00187ad4105872b391...).
I'm not entirely happy with that solution, but there doesn't seem to be another way, especially because the Scintilla docs basically tell that the list must be refreshed on every char entered.
What I wish next is that if I (accidentally) cancelled the scope auto completion list that then my keybinding to reshow it should show the same list again even if the cursor position is not directly after the '.' or '>'. I'll see if I can come up with a patch.
Best regards.
On Mon, 19 Apr 2010 14:44:31 +0200, Thomas wrote:
Alright, my first attempt introduced a regression, so I updated my git repo with another proposed fix (http://repo.or.cz/w/geany-mirror/kugel-geany.git/commit/ac00187ad4105872b391...).
Committed, thanks Thomas.
Regards, Enrico