To: vim_dev@googlegroups.com Subject: Patch 8.2.4334 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4334 Problem: Command line popup menu not positioned correctly. Solution: Also use vim_strsize() on the existing text. (Naruhiko Nishino, closes #9727) Files: src/cmdexpand.c, src/testdir/test_cmdline.vim, src/testdir/dumps/Test_wildmenu_pum_32.dump *** ../vim-8.2.4333/src/cmdexpand.c 2022-02-08 12:07:41.831496906 +0000 --- src/cmdexpand.c 2022-02-09 11:48:09.072634723 +0000 *************** *** 622,628 **** compl_match_array[i].pum_extra = NULL; compl_match_array[i].pum_kind = NULL; } ! compl_startcol = ccline->cmdpos + 1; columns = vim_strsize(xp->xp_pattern); if (showtail) { --- 622,628 ---- compl_match_array[i].pum_extra = NULL; compl_match_array[i].pum_kind = NULL; } ! compl_startcol = vim_strsize(ccline->cmdbuff) + 1; columns = vim_strsize(xp->xp_pattern); if (showtail) { *** ../vim-8.2.4333/src/testdir/test_cmdline.vim 2022-02-08 17:40:13.649047302 +0000 --- src/testdir/test_cmdline.vim 2022-02-09 11:48:09.072634723 +0000 *************** *** 2141,2146 **** --- 2141,2157 ---- call TermWait(buf) call VerifyScreenDump(buf, 'Test_wildmenu_pum_31', {}) + " Tests a directory name contained full-width characters. + call mkdir('Xdir/あいう', 'p') + call writefile([], 'Xdir/あいう/abc') + call writefile([], 'Xdir/あいう/xyz') + call writefile([], 'Xdir/あいう/123') + + call term_sendkeys(buf, "\set wildmode&\") + call term_sendkeys(buf, ":\e Xdir/あいう/\") + call TermWait(buf) + call VerifyScreenDump(buf, 'Test_wildmenu_pum_32', {}) + call term_sendkeys(buf, "\\") call StopVimInTerminal(buf) call delete('Xtest') *** ../vim-8.2.4333/src/testdir/dumps/Test_wildmenu_pum_32.dump 2022-02-09 11:52:00.076342832 +0000 --- src/testdir/dumps/Test_wildmenu_pum_32.dump 2022-02-09 11:48:09.072634723 +0000 *************** *** 0 **** --- 1,10 ---- + | +0&#ffffff0@74 + |~+0#4040ff13&| @73 + |~| @73 + |~| @73 + |~| @73 + |~| @73 + |~| @12| +0#0000001#e0e0e08|1|2|3| @11| +0#4040ff13#ffffff0@44 + |~| @12| +0#0000001#ffd7ff255|a|b|c| @11| +0#4040ff13#ffffff0@44 + |~| @12| +0#0000001#ffd7ff255|x|y|z| @11| +0#4040ff13#ffffff0@44 + |:+0#0000000&|e| |X|d|i|r|/|あ*&|い|う|/+&|1|2|3> @56 *** ../vim-8.2.4333/src/version.c 2022-02-08 21:17:18.885463903 +0000 --- src/version.c 2022-02-09 11:51:10.444407959 +0000 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 4334, /**/ -- How To Keep A Healthy Level Of Insanity: 6. In the memo field of all your checks, write "for sexual favors". /// 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 ///