Mercurial > vim
changeset 18120:ed222e264905 v8.1.2055
patch 8.1.2055: not easy to jump to function line from profile
Commit: https://github.com/vim/vim/commit/181d4f58cc421f2e6d3b16333d4cb70d35ad1342
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Sep 18 22:04:56 2019 +0200
patch 8.1.2055: not easy to jump to function line from profile
Problem: Not easy to jump to function line from profile.
Solution: Use "file:99" instead of "file line 99" so that "gf" works.
(Daniel Hahler, closes #4951)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 18 Sep 2019 22:15:03 +0200 |
parents | 40a1b1bc457e |
children | a505da83c907 |
files | src/profiler.c src/testdir/test_profile.vim src/version.c |
diffstat | 3 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/profiler.c +++ b/src/profiler.c @@ -696,7 +696,7 @@ func_dump_profile(FILE *fd) get_scriptname(fp->uf_script_ctx.sc_sid)); if (p != NULL) { - fprintf(fd, " Defined: %s line %ld\n", + fprintf(fd, " Defined: %s:%ld\n", p, (long)fp->uf_script_ctx.sc_lnum); vim_free(p); }
--- a/src/testdir/test_profile.vim +++ b/src/testdir/test_profile.vim @@ -55,7 +55,7 @@ func Test_profile_func() call assert_equal(30, len(lines)) call assert_equal('FUNCTION Foo1()', lines[0]) - call assert_match('Defined:.*Xprofile_func.vim', lines[1]) + call assert_match('Defined:.*Xprofile_func.vim:3', lines[1]) call assert_equal('Called 2 times', lines[2]) call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[3]) call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[4])