0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 8.2.4334: command line popup menu not positioned correctly

Problem:    Command line popup menu not positioned correctly.
Solution:   Also use vim_strsize() on the existing text. (Naruhiko Nishino,
            closes #9727)
This commit is contained in:
rbtnn
2022-02-09 11:55:47 +00:00
committed by Bram Moolenaar
parent b6a138eb33
commit 68cc2b8a37
4 changed files with 24 additions and 1 deletions

View File

@@ -622,7 +622,7 @@ showmatches(expand_T *xp, int wildmenu UNUSED)
compl_match_array[i].pum_extra = NULL; compl_match_array[i].pum_extra = NULL;
compl_match_array[i].pum_kind = NULL; compl_match_array[i].pum_kind = NULL;
} }
compl_startcol = ccline->cmdpos + 1; compl_startcol = vim_strsize(ccline->cmdbuff) + 1;
columns = vim_strsize(xp->xp_pattern); columns = vim_strsize(xp->xp_pattern);
if (showtail) if (showtail)
{ {

View File

@@ -0,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

View File

@@ -2141,6 +2141,17 @@ func Test_wildmenu_pum()
call TermWait(buf) call TermWait(buf)
call VerifyScreenDump(buf, 'Test_wildmenu_pum_31', {}) 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, "\<C-U>set wildmode&\<CR>")
call term_sendkeys(buf, ":\<C-U>e Xdir/あいう/\<Tab>")
call TermWait(buf)
call VerifyScreenDump(buf, 'Test_wildmenu_pum_32', {})
call term_sendkeys(buf, "\<C-U>\<CR>") call term_sendkeys(buf, "\<C-U>\<CR>")
call StopVimInTerminal(buf) call StopVimInTerminal(buf)
call delete('Xtest') call delete('Xtest')

View File

@@ -746,6 +746,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
4334,
/**/ /**/
4333, 4333,
/**/ /**/