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('.')