To: vim_dev@googlegroups.com Subject: Patch 8.0.1519 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1519 Problem: Getchangelist() does not use argument as bufname(). Solution: Use get_buf_tv(). (Yegappan Lakshmanan, closes #2641) Files: src/evalfunc.c, src/testdir/test_changelist.vim *** ../vim-8.0.1518/src/evalfunc.c 2018-02-13 13:59:42.191667272 +0100 --- src/evalfunc.c 2018-02-13 19:03:06.154845452 +0100 *************** *** 4365,4371 **** return; #ifdef FEAT_JUMPLIST ! buf = find_buffer(&argvars[0]); if (buf == NULL) return; --- 4365,4374 ---- return; #ifdef FEAT_JUMPLIST ! (void)get_tv_number(&argvars[0]); /* issue errmsg if type error */ ! ++emsg_off; ! buf = get_buf_tv(&argvars[0], FALSE); ! --emsg_off; if (buf == NULL) return; *** ../vim-8.0.1518/src/testdir/test_changelist.vim 2018-02-13 13:59:42.191667272 +0100 --- src/testdir/test_changelist.vim 2018-02-13 19:05:33.469595003 +0100 *************** *** 9,15 **** bwipe! enew call assert_equal([], getchangelist(10)) ! call assert_equal([[], 0], getchangelist(bufnr('%'))) call writefile(['line1', 'line2', 'line3'], 'Xfile1.txt') call writefile(['line1', 'line2', 'line3'], 'Xfile2.txt') --- 9,15 ---- bwipe! enew call assert_equal([], getchangelist(10)) ! call assert_equal([[], 0], getchangelist('%')) call writefile(['line1', 'line2', 'line3'], 'Xfile1.txt') call writefile(['line1', 'line2', 'line3'], 'Xfile2.txt') *************** *** 23,29 **** \ {'lnum' : 2, 'col' : 4, 'coladd' : 0}, \ {'lnum' : 4, 'col' : 4, 'coladd' : 0}, \ {'lnum' : 6, 'col' : 4, 'coladd' : 0}], 2], ! \ getchangelist(bufnr('%'))) hide edit Xfile2.txt exe "normal 1GOline\u1.0" --- 23,29 ---- \ {'lnum' : 2, 'col' : 4, 'coladd' : 0}, \ {'lnum' : 4, 'col' : 4, 'coladd' : 0}, \ {'lnum' : 6, 'col' : 4, 'coladd' : 0}], 2], ! \ getchangelist('%')) hide edit Xfile2.txt exe "normal 1GOline\u1.0" *************** *** 31,37 **** call assert_equal([[ \ {'lnum' : 1, 'col' : 6, 'coladd' : 0}, \ {'lnum' : 3, 'col' : 6, 'coladd' : 0}], 2], ! \ getchangelist(bufnr('%'))) hide enew call assert_equal([[ --- 31,37 ---- call assert_equal([[ \ {'lnum' : 1, 'col' : 6, 'coladd' : 0}, \ {'lnum' : 3, 'col' : 6, 'coladd' : 0}], 2], ! \ getchangelist('%')) hide enew call assert_equal([[ *** ../vim-8.0.1518/src/version.c 2018-02-13 18:05:14.080439478 +0100 --- src/version.c 2018-02-13 19:05:53.193430720 +0100 *************** *** 773,774 **** --- 773,776 ---- { /* Add new patch number below this line */ + /**/ + 1519, /**/ -- Advice to worms: Sleep late. /// 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 ///