From 95d53c5b3f9d7791ffbcf56dc7bace5560d3719d Mon Sep 17 00:00:00 2001 From: Steve Losh Date: Tue, 12 Oct 2010 18:44:51 -0400 Subject: [PATCH] Fix movement bounds in the graph pane. --- plugin/gundo.vim | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugin/gundo.vim b/plugin/gundo.vim index e5dcd1e..31bb7f3 100644 --- a/plugin/gundo.vim +++ b/plugin/gundo.vim @@ -23,6 +23,10 @@ endif "{{{ Movement Mappings function! s:GundoMoveUp() + if line('.') - 2 <= 4 + return + endif + call cursor(line('.') - 2, 0) let line = getline('.') @@ -40,6 +44,10 @@ function! s:GundoMoveUp() endfunction function! s:GundoMoveDown() + if line('.') + 2 >= line('$') + return + endif + call cursor(line('.') + 2, 0) let line = getline('.')