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:
@@ -622,7 +622,7 @@ showmatches(expand_T *xp, int wildmenu UNUSED)
|
||||
compl_match_array[i].pum_extra = 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);
|
||||
if (showtail)
|
||||
{
|
||||
|
10
src/testdir/dumps/Test_wildmenu_pum_32.dump
Normal file
10
src/testdir/dumps/Test_wildmenu_pum_32.dump
Normal 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
|
@@ -2141,6 +2141,17 @@ func Test_wildmenu_pum()
|
||||
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, "\<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 StopVimInTerminal(buf)
|
||||
call delete('Xtest')
|
||||
|
@@ -746,6 +746,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
4334,
|
||||
/**/
|
||||
4333,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user