Fix movement commands with counts in the graph.
fixes issue 14
This commit is contained in:
parent
6ff32f219f
commit
484d9846ef
@ -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.
|
||||
|
||||
|
@ -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)
|
||||
|
@ -331,6 +331,7 @@ let g:gundo_right = 1
|
||||
<li>Development version
|
||||
<ul>
|
||||
<li>Add the <code>g:gundo_disable</code> setting.</li>
|
||||
<li>Fix movement commands with counts in the graph.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>v1.0.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user