diff --git a/doc/gundo.txt b/doc/gundo.txt index 15c5366..77330a0 100644 --- a/doc/gundo.txt +++ b/doc/gundo.txt @@ -189,6 +189,7 @@ GitHub: http://github.com/sjl/gundo.vim/ Development version * Add the g:gundo_disable setting. + * Fix movement commands with counts in the graph. v1.0.0 * Initial stable release. diff --git a/plugin/gundo.vim b/plugin/gundo.vim index 370e358..526091b 100644 --- a/plugin/gundo.vim +++ b/plugin/gundo.vim @@ -707,14 +707,13 @@ endfunction"}}} "{{{ Gundo movement -function! s:GundoMove(direction)"{{{ +function! s:GundoMove(direction) range"{{{ let start_line = getline('.') + let distance = 2 * v:count1 - " If we're in between two nodes we move by one to get back on track. + " If we're in between two nodes we move by one less to get back on track. if stridx(start_line, '[') == -1 - let distance = 1 - else - let distance = 2 + let distance = distance - 1 endif let target_n = line('.') + (distance * a:direction) diff --git a/site/index.html b/site/index.html index 4a1d558..b51d500 100644 --- a/site/index.html +++ b/site/index.html @@ -331,6 +331,7 @@ let g:gundo_right = 1
g:gundo_disable
setting.