[gnome-builder] source-view: stash line offset after button-press-event



commit a418ab19905d1a1b994ca8a32f3c87b05f78a5cd
Author: Christian Hergert <christian hergert me>
Date:   Mon May 11 15:57:30 2015 -0700

    source-view: stash line offset after button-press-event
    
    This fixes a bug where when we were at line-offset 4, and then click
    at line offset 10, and then move down a line (using j in vim mode) we
    would end up on line offset 4 again.

 libide/ide-source-view.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/libide/ide-source-view.c b/libide/ide-source-view.c
index 5c55b15..39f9dd5 100644
--- a/libide/ide-source-view.c
+++ b/libide/ide-source-view.c
@@ -2214,6 +2214,12 @@ ide_source_view_real_button_press_event (GtkWidget      *widget,
         }
     }
 
+  /*
+   * Update our target offset so movements don't cause us to revert
+   * to the previous offset.
+   */
+  ide_source_view_save_offset (self);
+
   return ret;
 }
 


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