]> granicus.if.org Git - vim/commitdiff
patch 8.1.2055: not easy to jump to function line from profile v8.1.2055
authorBram Moolenaar <Bram@vim.org>
Wed, 18 Sep 2019 20:04:56 +0000 (22:04 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 18 Sep 2019 20:04:56 +0000 (22:04 +0200)
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)

src/profiler.c
src/testdir/test_profile.vim
src/version.c

index d7d010f79fcfb08fb35678fb0fa717096fffa5bb..0bfce86960ea986a6c42a45fbf2338c28cc027cb 100644 (file)
@@ -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);
                    }
index d0546df865d9e5081b5716045c248a9b91343b20..a4ce13510b9c5e000f6018604fd2ce24abf9a6e1 100644 (file)
@@ -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])
index 8720886895fc61c7ae73ff223ff90a5301253cb5..1c7ece3c859a3ca07ed77e8f92bde158be0d1595 100644 (file)
@@ -757,6 +757,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2055,
 /**/
     2054,
 /**/