From fb6f27e86f2ca2fbff88737251d9e26016a62081 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Wed, 22 Sep 2021 15:12:06 +0200 Subject: vim-patch:34cc7d8c034f #15753 Update runtime files https://github.com/vim/vim/commit/34cc7d8c034f2bc5b57455577051db8d72e2b87c --- runtime/ftplugin/gprof.vim | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'runtime/ftplugin/gprof.vim') diff --git a/runtime/ftplugin/gprof.vim b/runtime/ftplugin/gprof.vim index d4547ae9a6..d8974bcc84 100644 --- a/runtime/ftplugin/gprof.vim +++ b/runtime/ftplugin/gprof.vim @@ -1,6 +1,7 @@ -" Language: gprof -" Maintainer: Dominique Pelle -" Last Change: 2021 Apr 08 +" Language: gprof +" Maintainer: Dominique Pelle +" Contributors: Doug Kearns +" Last Change: 2021 Sep 19 " When cursor is on one line of the gprof call graph, " calling this function jumps to this function in the call graph. @@ -9,7 +10,7 @@ if exists("b:did_ftplugin") endif let b:did_ftplugin=1 -fun! GprofJumpToFunctionIndex() +func! GprofJumpToFunctionIndex() let l:line = getline('.') if l:line =~ '[\d\+\]$' " We're in a line in the call graph. @@ -22,11 +23,14 @@ fun! GprofJumpToFunctionIndex() call search('^\[\d\+\].*\d\s\+' . escape(@", '[]*.') . '\>', 'sW') norm! zz endif -endfun +endfunc -" Pressing on a line in the gprof flat profile or in -" the call graph, jumps to the corresponding function inside -" the flat profile. -map :call GprofJumpToFunctionIndex() +if !exists("no_plugin_maps") && !exists("no_gprof_maps") + " Pressing on a line in the gprof flat profile or in + " the call graph, jumps to the corresponding function inside + " the flat profile. + map :call GprofJumpToFunctionIndex() + let b:undo_ftplugin = "silent! unmap " +endif " vim:sw=2 fdm=indent -- cgit