]> git.cworth.org Git - sup/blobdiff - lib/sup/modes/scroll-mode.rb
ThreadIndexMode: handle deleted updates correctly
[sup] / lib / sup / modes / scroll-mode.rb
index ff725185fcb17fd52ec8ce05c72b6929748efc37..219a4ce33bb0271653775276b38ef1d88f6f9c6b 100644 (file)
@@ -12,7 +12,7 @@ class ScrollMode < Mode
 
   attr_reader :status, :topline, :botline, :leftcol
 
-  COL_JUMP = 2
+  COL_JUMP = 4
 
   register_keymap do |k|
     k.add :line_down, "Down one line", :down, 'j', 'J'
@@ -101,6 +101,7 @@ class ScrollMode < Mode
   end
 
   def jump_to_col col
+    col = col - (col % COL_JUMP)
     buffer.mark_dirty unless @leftcol == col
     @leftcol = col
   end