8637cdbbba8a

Fix movement bounds in the graph pane.
[view raw] [browse files]
author Steve Losh <steve@dwaiter.com>
date Tue, 12 Oct 2010 18:44:51 -0400
parents ce825e4ac9e0
children 7f1c71ef5141
branches/tags (none)
files plugin/gundo.vim

Changes

--- a/plugin/gundo.vim	Tue Oct 12 18:36:02 2010 -0400
+++ b/plugin/gundo.vim	Tue Oct 12 18:44:51 2010 -0400
@@ -23,6 +23,10 @@
 
 "{{{ Movement Mappings
 function! s:GundoMoveUp()
+    if line('.') - 2 <= 4
+        return
+    endif
+
     call cursor(line('.') - 2, 0)
 
     let line = getline('.')
@@ -40,6 +44,10 @@
 endfunction
 
 function! s:GundoMoveDown()
+    if line('.') + 2 >= line('$')
+        return
+    endif
+
     call cursor(line('.') + 2, 0)
 
     let line = getline('.')