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
|
Development version
|
||||||
* Add the g:gundo_disable setting.
|
* Add the g:gundo_disable setting.
|
||||||
|
* Fix movement commands with counts in the graph.
|
||||||
v1.0.0
|
v1.0.0
|
||||||
* Initial stable release.
|
* Initial stable release.
|
||||||
|
|
||||||
|
@ -707,14 +707,13 @@ endfunction"}}}
|
|||||||
|
|
||||||
"{{{ Gundo movement
|
"{{{ Gundo movement
|
||||||
|
|
||||||
function! s:GundoMove(direction)"{{{
|
function! s:GundoMove(direction) range"{{{
|
||||||
let start_line = getline('.')
|
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
|
if stridx(start_line, '[') == -1
|
||||||
let distance = 1
|
let distance = distance - 1
|
||||||
else
|
|
||||||
let distance = 2
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let target_n = line('.') + (distance * a:direction)
|
let target_n = line('.') + (distance * a:direction)
|
||||||
|
@ -331,6 +331,7 @@ let g:gundo_right = 1
|
|||||||
<li>Development version
|
<li>Development version
|
||||||
<ul>
|
<ul>
|
||||||
<li>Add the <code>g:gundo_disable</code> setting.</li>
|
<li>Add the <code>g:gundo_disable</code> setting.</li>
|
||||||
|
<li>Fix movement commands with counts in the graph.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li>v1.0.0
|
<li>v1.0.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user