Re: Howto register/unregister words completion provider on buffer change in textview?



On 09/16/2018 03:21 AM, David C. Rankin wrote:
  Each treemodel entry has a struct containing a pointer to its
GtkSourceCompletionWords provider.

Uugh...

That should read the editor instance struct associated with the sourceview has
a pointer to its GtkSourceCompletionWords provider. (the tree model just holds
a struct containing a pointer to its GtkSourceBuffer which is what allows
updating the textview/sourceview window on the right with the new buffer).

So when I click a different file in the treeview, I want to associate that
buffer as the word-source for the GtkSourceCompletionWords provider for the
textview by unregistering the existing buffer as the word-source and
registering the new buffer as the source for the provider in the textview.

-- 
David C. Rankin, J.D.,P.E.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]