summaryrefslogtreecommitdiffstats
path: root/runtime/ftplugin/gprof.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-06-12 21:29:15 +0200
committerBram Moolenaar <Bram@vim.org>2013-06-12 21:29:15 +0200
commitec7944aaf2d5fd67b7bd59a69d6a393424b6c8f8 (patch)
treed578871973ba7c87e0337dbe90b61d75de667100 /runtime/ftplugin/gprof.vim
parentcab465a6d7a7d158c99b04ddc81650b468d82227 (diff)
Update runtime files.
Diffstat (limited to 'runtime/ftplugin/gprof.vim')
-rw-r--r--runtime/ftplugin/gprof.vim14
1 files changed, 7 insertions, 7 deletions
diff --git a/runtime/ftplugin/gprof.vim b/runtime/ftplugin/gprof.vim
index f76dd31aea..750751c372 100644
--- a/runtime/ftplugin/gprof.vim
+++ b/runtime/ftplugin/gprof.vim
@@ -1,6 +1,6 @@
" Language: gprof
" Maintainer: Dominique Pelle <dominique.pelle@gmail.com>
-" Last Change: 2012 May 20
+" Last Change: 2013 Jun 09
" When cursor is on one line of the gprof call graph,
" calling this function jumps to this function in the call graph.
@@ -13,20 +13,20 @@ fun! <SID>GprofJumpToFunctionIndex()
let l:line = getline('.')
if l:line =~ '[\d\+\]$'
" We're in a line in the call graph.
- norm $y%
+ norm! $y%
call search('^' . escape(@", '[]'), 'sw')
- norm zz
+ norm! zz
elseif l:line =~ '^\(\s\+[0-9\.]\+\)\{3}\s\+'
" We're in line in the flat profile.
- norm 55|y$
- call search('^\[\d\+\].*\d\s\+' . escape(@", '[]*.'), 'sW')
- norm zz
+ norm! 55|eby$
+ call search('^\[\d\+\].*\d\s\+' . escape(@", '[]*.') . '\>', 'sW')
+ norm! zz
endif
endfun
" Pressing <C-]> on a line in the gprof flat profile or in
" the call graph, jumps to the corresponding function inside
" the flat profile.
-map <silent> <C-]> :call <SID>GprofJumpToFunctionIndex()<CR>
+map <buffer> <silent> <C-]> :call <SID>GprofJumpToFunctionIndex()<CR>
" vim:sw=2 fdm=indent