[gedit-list] Scroll to the cursor



From gedit 3.20

/* Scroll to the cursor when the document is loaded, we need to do it in
 * an idle as after the document is loaded the textview is still
 * redrawing and relocating its internals.
 */
if (tab->idle_scroll == 0)
{
        tab->idle_scroll = g_idle_add ((GSourceFunc)scroll_to_cursor, tab);
}


It took me four hours to find this :-(

Of course this function is very important for "goto definition" IDE
support. So I opened a new sourceview and tried to jump to a specific
location. All the time I thought I was doing something wrong, and
google was not really helpful this time.

This problem is not mentioned in the documentation.

And finally, is there really no simpler solution available?


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