mirror of
https://github.com/vim/vim.git
synced 2025-10-02 05:04:20 -04:00
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)
This commit is contained in:
@@ -696,7 +696,7 @@ func_dump_profile(FILE *fd)
|
|||||||
get_scriptname(fp->uf_script_ctx.sc_sid));
|
get_scriptname(fp->uf_script_ctx.sc_sid));
|
||||||
if (p != NULL)
|
if (p != NULL)
|
||||||
{
|
{
|
||||||
fprintf(fd, " Defined: %s line %ld\n",
|
fprintf(fd, " Defined: %s:%ld\n",
|
||||||
p, (long)fp->uf_script_ctx.sc_lnum);
|
p, (long)fp->uf_script_ctx.sc_lnum);
|
||||||
vim_free(p);
|
vim_free(p);
|
||||||
}
|
}
|
||||||
|
@@ -55,7 +55,7 @@ func Test_profile_func()
|
|||||||
call assert_equal(30, len(lines))
|
call assert_equal(30, len(lines))
|
||||||
|
|
||||||
call assert_equal('FUNCTION Foo1()', lines[0])
|
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_equal('Called 2 times', lines[2])
|
||||||
call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[3])
|
call assert_match('^Total time:\s\+\d\+\.\d\+$', lines[3])
|
||||||
call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[4])
|
call assert_match('^ Self time:\s\+\d\+\.\d\+$', lines[4])
|
||||||
|
@@ -757,6 +757,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2055,
|
||||||
/**/
|
/**/
|
||||||
2054,
|
2054,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user