Mercurial > vim
annotate runtime/ftplugin/gprof.vim @ 32879:49e4d7aa402c v9.0.1748
patch 9.0.1748: CI: cannot label issues automatically
Commit: https://github.com/vim/vim/commit/6d192a4ac9ba600ec28eb86d2cc45dea67f5922b
Author: Philip H <47042125+pheiduck@users.noreply.github.com>
Date: Sat Aug 19 14:30:47 2023 +0200
patch 9.0.1748: CI: cannot label issues automatically
Problem: CI: cannot label issues automatically
Solution: Create CI labeler
closes: #12788
Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Philip H <47042125+pheiduck@users.noreply.github.com>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 19 Aug 2023 15:00:05 +0200 |
parents | 65de67669df3 |
children |
rev | line source |
---|---|
25836 | 1 " Language: gprof |
2 " Maintainer: Dominique Pelle <dominique.pelle@gmail.com> | |
3 " Contributors: Doug Kearns <dougkearns@gmail.com> | |
4 " Last Change: 2021 Sep 19 | |
4681
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
5 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
6 " When cursor is on one line of the gprof call graph, |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
7 " calling this function jumps to this function in the call graph. |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
8 if exists("b:did_ftplugin") |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
9 finish |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
10 endif |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
11 let b:did_ftplugin=1 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
12 |
25836 | 13 func! <SID>GprofJumpToFunctionIndex() |
4681
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
14 let l:line = getline('.') |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
15 if l:line =~ '[\d\+\]$' |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
16 " We're in a line in the call graph. |
4869 | 17 norm! $y% |
4681
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
18 call search('^' . escape(@", '[]'), 'sw') |
4869 | 19 norm! zz |
24468 | 20 elseif l:line =~ '^\(\s*[0-9\.]\+\)\{3}\s\+' |
4681
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
21 " We're in line in the flat profile. |
4869 | 22 norm! 55|eby$ |
23 call search('^\[\d\+\].*\d\s\+' . escape(@", '[]*.') . '\>', 'sW') | |
24 norm! zz | |
4681
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
25 endif |
25836 | 26 endfunc |
4681
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
27 |
25836 | 28 if !exists("no_plugin_maps") && !exists("no_gprof_maps") |
29 " Pressing <C-]> on a line in the gprof flat profile or in | |
30 " the call graph, jumps to the corresponding function inside | |
31 " the flat profile. | |
32 map <buffer> <silent> <C-]> :call <SID>GprofJumpToFunctionIndex()<CR> | |
33 let b:undo_ftplugin = "silent! unmap <buffer> <C-]>" | |
34 endif | |
4681
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
35 |
2eb30f341e8d
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
36 " vim:sw=2 fdm=indent |