To: vim_dev@googlegroups.com Subject: Patch 8.1.2055 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.2055 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) Files: src/profiler.c, src/testdir/test_profile.vim *** ../vim-8.1.2054/src/profiler.c 2019-08-30 18:37:21.548472275 +0200 --- src/profiler.c 2019-09-18 22:00:33.607724235 +0200 *************** *** 696,702 **** get_scriptname(fp->uf_script_ctx.sc_sid)); if (p != NULL) { ! fprintf(fd, " Defined: %s line %ld\n", p, (long)fp->uf_script_ctx.sc_lnum); vim_free(p); } --- 696,702 ---- get_scriptname(fp->uf_script_ctx.sc_sid)); if (p != NULL) { ! fprintf(fd, " Defined: %s:%ld\n", p, (long)fp->uf_script_ctx.sc_lnum); vim_free(p); } *** ../vim-8.1.2054/src/testdir/test_profile.vim 2019-08-30 18:37:21.548472275 +0200 --- src/testdir/test_profile.vim 2019-09-18 22:02:29.559350374 +0200 *************** *** 55,61 **** call assert_equal(30, len(lines)) call assert_equal('FUNCTION Foo1()', lines[0]) ! call assert_match('Defined:.*Xprofile_func.vim', 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]) --- 55,61 ---- call assert_equal(30, len(lines)) call assert_equal('FUNCTION Foo1()', lines[0]) ! 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]) *** ../vim-8.1.2054/src/version.c 2019-09-18 21:42:34.564859024 +0200 --- src/version.c 2019-09-18 22:02:51.207282114 +0200 *************** *** 759,760 **** --- 759,762 ---- { /* Add new patch number below this line */ + /**/ + 2055, /**/ -- FIRST HEAD: All right! All right! We'll kill him first and then have tea and biscuits. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///