GNOME Bugzilla – Bug 625918
Backspace should trigger a new completion
Last modified: 2013-06-17 19:10:11 UTC
As told by jessevdk, in irc, this behavior was modified in commit f73ffecb
Just to provide some more information, I don't think backspace should trigger a new interactive completion in all cases. Starting a completion each time you remove some text can be very annoying since what you are doing is not trying to insert new text, but to remove some text. That said, something can be said for the case where you are in an interactive completion and type a wrong character (making it such that there are no matches in the provider) cancelling the interactive completion. In that case, starting again the interactive completion when removing the last character is desired. We need to think about if and how this can be implemented correctly.
It is possible to prevent the completion window to disappear when there is no proposals anymore, by adding a dummy proposal "No proposals" or something like that. With this method, when some characters are removed, new proposals can reappear. Currently it must be explicitly handled by the provider, but we could think of a better way to do that with a new function in the API.
Instead of adding a new function in the API, I think we can simply document this. I'll attach a patch.
Created attachment 246733 [details] [review] Doc: interactive completion and insertion/deletion in the buffer
Review of attachment 246733 [details] [review]: Some minor comments. Although maybe would be better to get a round from pbor too :) ::: gtksourceview/gtksourcecompletioncontext.c @@ +46,3 @@ + * only on insertion in the buffer, not on deletion. Once the completion window + * is visible, then on each insertion or deletion, there is a new population and + * the providers are asked to add proposals. If there is no more proposals, the if there are no... @@ +48,3 @@ + * the providers are asked to add proposals. If there is no more proposals, the + * completion window disappears. So if you want to keep the completion window + * visible, but there is no proposals, you can insert a dummy proposal named for there are @@ +49,3 @@ + * completion window disappears. So if you want to keep the completion window + * visible, but there is no proposals, you can insert a dummy proposal named for + * example "No proposals". For example, the user types progressively the name of named "No proposals". (this way we do not put 2 times For example @@ +51,3 @@ + * example "No proposals". For example, the user types progressively the name of + * a function, and some proposals appear. The user types a bad character and + * there is no proposals anymore. What the user wants is to delete the last there are
Created attachment 247038 [details] [review] Doc: interactive completion and insertion/deletion in the buffer
Pushed to the master branch.