GNOME Bugzilla – Bug 790101
tries to autocomplete "else"
Last modified: 2017-11-09 01:19:32 UTC
I'm getting ctags trying to complete "else" into "EILSEQ". Ctags needs to know about reserved words, or somthing else.
Created attachment 363270 [details] [review] ctags: try to avoid activating various keywords We don't have a really great way to deal with this using the completion system provided by GtkSourceView (as there is not a way to get the activation key to perform the desired indent or space). But we can at least avoid activating the item and leave the insertion cursor where it was. To do this better, we need to build a new completion engine for Builder/GSV that does things a bit differently. Either way, this avoids some common keywords. If you're trying to get a newline afterwards, you'll have to hit enter a second time (as this will just dismiss the completion window).
Thanks for reporting! Longer term, we'll need to build a new completion engine to handle corner cases like this more effectively. This patch will stop the completion request leaving the insertion cursor at the same location. So hitting enter a second time will be needed if you want a newline. We can't automatically insert the newline/indent from the completion provider because it doesn't know about those settings, nor does it know what key was pressed to activate the completion item. Attachment 363270 [details] pushed as cc287c2 - ctags: try to avoid activating various keywords