gtk_text_buffer_set_text and remember cursor/adjustments



Hi!

Is there a way to set the text of a GtkTextView but also keep the cursor location and adjustments of a 
GtkScrolledWindow where the text view resides?

I am trying to do it using the attached code but there are two problems:

1.  When you scroll down, set the cursor and then press 'Reload' there is a lot of visual flickering 
(scrollbar and text view).

2. The adjustment is changed such that the cursor is on the last line.

Any idea about how to do this properly, e.g. without any noticeable visual effect?

Usecase: syntax checking/auto-correct in a programming environment (replace 'Reload' by 'Compile and update' 
and you get the idea).

Best regards,

Steffen 


      


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