[gnome-builder] source-view: remove "pin-to-bottom" feature



commit b1ca86cc61b8bdc334d0df3ac7fb6d2af3ff9bce
Author: Christian Hergert <christian hergert me>
Date:   Mon Dec 21 18:52:34 2015 -0800

    source-view: remove "pin-to-bottom" feature
    
    Now that we have a proper overscroll on IdeSourceView, we can remove the
    pin-to-bottom feature that was primarily a workaround for editing near the
    end of the file.
    
    Instead, now just overscroll occasionally as needed.

 libide/ide-source-view.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/libide/ide-source-view.c b/libide/ide-source-view.c
index 5d52ea2..34a1f0e 100644
--- a/libide/ide-source-view.c
+++ b/libide/ide-source-view.c
@@ -3831,21 +3831,17 @@ ide_source_view_real_insert_at_cursor (GtkTextView *text_view,
 {
   IdeSourceView *self = (IdeSourceView *)text_view;
   GtkTextBuffer *buffer;
-  gboolean at_bottom;
+  GtkTextMark *insert;
 
   g_assert (IDE_IS_SOURCE_VIEW (self));
   g_assert (GTK_IS_TEXT_VIEW (text_view));
   g_assert (str);
 
-  at_bottom = ide_source_view_get_at_bottom (self);
-
   GTK_TEXT_VIEW_CLASS (ide_source_view_parent_class)->insert_at_cursor (text_view, str);
 
   buffer = gtk_text_view_get_buffer (text_view);
-  ide_source_view_scroll_mark_onscreen (self, gtk_text_buffer_get_insert (buffer), FALSE, 0, 0);
-
-  if (at_bottom)
-    ide_source_view_scroll_to_bottom (self);
+  insert = gtk_text_buffer_get_insert (buffer);
+  ide_source_view_scroll_mark_onscreen (self, insert, FALSE, 0, 0);
 }
 
 static void


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