All, I have been wrestling with this issue for a month (not continually, but as time and curiosity permit). I have posted to the gtk-app list (see thread: "Howto register/unregister words completion provider on buffer changein textview?"), but so far there has been no solution. So I thought I would take a stab on factory and see if there were any GTK wizards here. The basic background is have built a single-document interface editor (similar to gedit/kwrite) in gtk and use gtksourceview for word-completion (it works fine). (e.g. http://download.opensuse.org/repositories/home:/drankinatty/openSUSE_Leap_15...) I have now branched tha project to create a multi-document interface editor similar to kate, the basic layout being: +===================================================+ |menu | +------------+--------------------------------------+ | file_a | | | file_b | | | file_c | TextView | | | with | | | WordCompletion | | | | | | | | | | | | | +------------+--------------------------------------+ Here completion works fine for the first buffer bound to the completion object, and for additional buffers activated in split windows on the right, but with a multi-document interface, I need to be able to change the buffer visible any given textview and change the buffer used as the source of the word-completion (which the gtksourceview functions to either register/unregisters words used for completion or add/remove the completion providers seemed tailor made for) However, there seems to be a private binding created at the time the completion object and provider are first created binding the original buffer to the completion object that I have not found a way to alter. I have boiled it down to a simple question: "Is it possible to change the buffer shown in a TextView (using gtksourceview) and have word-completion continue to work within that TextView?" The reason I ask is that it appears the completion is indelibly bound to the original buffer when word-completion is first activated. There does not seemto be a way to: gtk_source_completion_remove_provider /* removing and unreffing all */ and then after gtk_text_view_set_buffer (view, newbuf); gtk_source_completion_add_provider and have word-completion function. Similarly, there seems to be no way to retain the same completion provider (so remove/add is unnecessary) and simply: gtk_source_completion_words_unregister (prov_words, oldbuf); and then to update the words in the provider: gtk_source_completion_words_register (prov_words, newbuf); In all cases, the exact same behavior is observed. When the buffer is changed and all GtkSourceCompletionWords providers removed and a new provider created, words registered and added with the new buffer in the textview, word completion is non functional, no popup, no nothing. However if I go through the same process again and change the buffer shown in the textview from newbuf to original, remove all providers, creating a new provider, registering words (in the exact same order), then Walah! completion is magically working again. I've looked at the source code for GtkSourceView and unfortunately, most of it is bewildering, but it does appear there is a binding between the original buffer and the GtkSourceCompletion for the textview and the original buffer in the textview whencompletion is first activated. Is this right?? And, if it is, doesn't that effectively prevent changing buffers in a sourceview and having completion continue to function? And if that is the case, is this a gtksourceview bug or a feature? The code is currently written using GtkSourceView 2.11.2, but 3.23.2 and 4.0.2 seem identical in this regard. If nobody knows, is there a GtkSourceView specific list I can follow up on? It just doesn't seem right that I would need to destroy the entire textview widget just to keep completion working with a new buffer. Sorry of the long post, but I was hoping to avoid having to pull the GtkSourceView source completely apart to find out whether changing a buffer with word-completion is possible. Any help or links or other list suggestions greatly appreciated. -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org