Commit 03238950 authored by Christian Hergert's avatar Christian Hergert

editor: more robust scrolling attempts

This seems to be more reliable than stuff we've tried in the
past to get scrolling to work.
parent 7ba57bee
......@@ -549,5 +549,5 @@ ide_editor_view_scroll_to_line (IdeEditorView *self,
gtk_text_buffer_get_iter_at_line (GTK_TEXT_BUFFER (self->buffer), &iter, line);
gtk_text_buffer_select_range (GTK_TEXT_BUFFER (self->buffer), &iter, &iter);
ide_source_view_scroll_to_iter (self->source_view, &iter, 0.0, TRUE, 1.0, 0.5, FALSE);
ide_source_view_scroll_to_insert (self->source_view);
......@@ -706,7 +706,7 @@ animate_shrink (IdeSourceView *self,
static void
ide_source_view_scroll_to_insert (IdeSourceView *self)
GtkTextBuffer *buffer;
......@@ -717,6 +717,7 @@ ide_source_view_scroll_to_insert (IdeSourceView *self)
g_assert (IDE_IS_SOURCE_VIEW (self));
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (self));
_ide_buffer_cancel_cursor_restore (IDE_BUFFER (buffer));
mark = gtk_text_buffer_get_insert (buffer);
ide_source_view_scroll_mark_onscreen (self, mark, TRUE, 0.5, 0.5);
......@@ -431,6 +431,7 @@ void ide_source_view_scroll_to_iter (IdeSource
gdouble xalign,
gdouble yalign,
gboolean animate_scroll);
void ide_source_view_scroll_to_insert (IdeSourceView *self);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment