To: vim_dev@googlegroups.com Subject: Patch 8.2.3163 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.3163 Problem: Location list window may open a wrong file. Solution: Also update the qf_ptr field. (Wei-Chung Wen, closes #8565, closes #8566) Files: src/quickfix.c, src/testdir/test_quickfix.vim *** ../vim-8.2.3162/src/quickfix.c 2021-06-27 22:03:28.645707721 +0200 --- src/quickfix.c 2021-07-15 13:09:44.238196625 +0200 *************** *** 3461,3466 **** --- 3461,3467 ---- } qfl->qf_index = qf_index; + qfl->qf_ptr = qf_ptr; if (qf_win_pos_update(qi, old_qf_index)) // No need to print the error message if it's visible in the error // window *** ../vim-8.2.3162/src/testdir/test_quickfix.vim 2021-06-20 16:30:53.032313321 +0200 --- src/testdir/test_quickfix.vim 2021-07-15 13:09:44.238196625 +0200 *************** *** 5554,5557 **** --- 5554,5590 ---- call delete('Xfile2') endfunc + func Test_locationlist_open_in_newtab() + call s:create_test_file('Xqftestfile1') + call s:create_test_file('Xqftestfile2') + call s:create_test_file('Xqftestfile3') + + %bwipe! + + lgetexpr ['Xqftestfile1:5:Line5', + \ 'Xqftestfile2:10:Line10', + \ 'Xqftestfile3:16:Line16'] + + silent! llast + call assert_equal(1, tabpagenr('$')) + call assert_equal('Xqftestfile3', bufname()) + + set switchbuf=newtab + + silent! lfirst + call assert_equal(2, tabpagenr('$')) + call assert_equal('Xqftestfile1', bufname()) + + silent! lnext + call assert_equal(3, tabpagenr('$')) + call assert_equal('Xqftestfile2', bufname()) + + call delete('Xqftestfile1') + call delete('Xqftestfile2') + call delete('Xqftestfile3') + set switchbuf&vim + + %bwipe! + endfunc + " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.2.3162/src/version.c 2021-07-15 12:48:08.811766844 +0200 --- src/version.c 2021-07-15 13:12:29.293935136 +0200 *************** *** 757,758 **** --- 757,760 ---- { /* Add new patch number below this line */ + /**/ + 3163, /**/ -- hundred-and-one symptoms of being an internet addict: 147. You finally give up smoking...because it made the monitor dirty. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///