# HG changeset patch # User Steve Losh # Date 1287624201 14400 # Node ID ae519947b4a9b7da15a6ccee7c5ca36103cd9386 # Parent c976a27e5729ecde98aa6e8e9ed43d58516276f9 Add mouse support and rearrange some functions. diff -r c976a27e5729 -r ae519947b4a9 plugin/gundo.vim --- a/plugin/gundo.vim Wed Oct 20 20:18:18 2010 -0400 +++ b/plugin/gundo.vim Wed Oct 20 21:23:21 2010 -0400 @@ -54,218 +54,6 @@ "}}} -"{{{ Movement - -function! s:GundoMove(direction)"{{{ - let start_line = getline('.') - - " If we're in between two nodes we move by one to get back on track. - if stridx(start_line, '[') == -1 - let distance = 1 - else - let distance = 2 - endif - - let target_n = line('.') + (distance * a:direction) - - " Bound the movement to the graph. - if target_n <= 4 - call cursor(5, 0) - else - call cursor(target_n, 0) - endif - - let line = getline('.') - - " Move to the node, whether it's an @ or an o - let idx1 = stridx(line, '@') - let idx2 = stridx(line, 'o') - if idx1 != -1 - call cursor(0, idx1 + 1) - else - call cursor(0, idx2 + 1) - endif - - let target_line = matchstr(getline("."), '\v\[[0-9]+\]') - let target_num = matchstr(target_line, '\v[0-9]+') - call s:GundoRenderPreview(target_num) -endfunction"}}} - -"}}} - -"{{{ Gundo buffer settings - -function! s:GundoMapGraph()"{{{ - nnoremap