[gnome-builder] sourceview: keep x scroll captive for some movements



commit 36d9e0f3166ac4f4122033d800677ad422066dfa
Author: Christian Hergert <chergert redhat com>
Date:   Tue Nov 21 17:00:46 2017 -0800

    sourceview: keep x scroll captive for some movements
    
    These movements are also captive to the current line and
    therefore should not allow Y scrolling.

 src/libide/sourceview/ide-source-view-movements.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/libide/sourceview/ide-source-view-movements.c 
b/src/libide/sourceview/ide-source-view-movements.c
index d5f2891..1b45ff1 100644
--- a/src/libide/sourceview/ide-source-view-movements.c
+++ b/src/libide/sourceview/ide-source-view-movements.c
@@ -2069,23 +2069,27 @@ _ide_source_view_apply_movement (IdeSourceView         *self,
 
     case IDE_SOURCE_VIEW_MOVEMENT_FIRST_CHAR:
       mv.count = MAX (1, mv.count);
+      mv.scroll_align = IDE_SOURCE_SCROLL_X;
       ide_source_view_movements_first_char (&mv);
       xalign = 1.0;
       break;
 
     case IDE_SOURCE_VIEW_MOVEMENT_FIRST_NONSPACE_CHAR:
       mv.count = MAX (1, mv.count);
+      mv.scroll_align = IDE_SOURCE_SCROLL_X;
       ide_source_view_movements_first_nonspace_char (&mv);
       xalign = 1.0;
       break;
 
     case IDE_SOURCE_VIEW_MOVEMENT_MIDDLE_CHAR:
       mv.count = MAX (1, mv.count);
+      mv.scroll_align = IDE_SOURCE_SCROLL_X;
       ide_source_view_movements_middle_char (&mv);
       break;
 
     case IDE_SOURCE_VIEW_MOVEMENT_LAST_CHAR:
       mv.count = MAX (1, mv.count);
+      mv.scroll_align = IDE_SOURCE_SCROLL_X;
       ide_source_view_movements_last_char (&mv);
       break;
 
@@ -2265,6 +2269,7 @@ _ide_source_view_apply_movement (IdeSourceView         *self,
 
     case IDE_SOURCE_VIEW_MOVEMENT_LINE_END:
       mv.count = MAX (1, mv.count);
+      mv.scroll_align = IDE_SOURCE_SCROLL_X;
       ide_source_view_movements_line_end (&mv);
       break;
 


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