mirror of
https://github.com/vim/vim.git
synced 2025-10-26 09:14:23 -04:00
patch 9.1.1639: completion: popup may be misplaced
Problem: During commandline completiom, popup window placement can be
incorrect when 'noselect' is present in 'wildmode'
(Shane-XB-Qian)
Solution: Disable "showtail" feature when 'noselect' is present.
fixes: #17969
closes: #18001
Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
a09b1604d4
commit
1e38198a41
8
src/testdir/dumps/Test_expand_env_var_1.dump
Normal file
8
src/testdir/dumps/Test_expand_env_var_1.dump
Normal file
@@ -0,0 +1,8 @@
|
||||
| +0&#ffffff0@74
|
||||
|~+0#4040ff13&| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| | +0#0000001#ffd7ff255|a|/|b|/|c|/| @8| +0#4040ff13#ffffff0@56
|
||||
|~| | +0#0000001#ffd7ff255|a|/|b|/|f|i|l|e|X|n|a|m|e|1| | +0#4040ff13#ffffff0@56
|
||||
|~| | +0#0000001#ffd7ff255|a|/|b|/|f|i|l|e|X|n|a|m|e|2| | +0#4040ff13#ffffff0@56
|
||||
|:+0#0000000&|e| |$|T|E|S|T|D|I|R|/> @62
|
||||
8
src/testdir/dumps/Test_expand_env_var_2.dump
Normal file
8
src/testdir/dumps/Test_expand_env_var_2.dump
Normal file
@@ -0,0 +1,8 @@
|
||||
| +0&#ffffff0@74
|
||||
|~+0#4040ff13&| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| | +0#0000001#e0e0e08|a|/|b|/|c|/| @8| +0#4040ff13#ffffff0@56
|
||||
|~| | +0#0000001#ffd7ff255|a|/|b|/|f|i|l|e|X|n|a|m|e|1| | +0#4040ff13#ffffff0@56
|
||||
|~| | +0#0000001#ffd7ff255|a|/|b|/|f|i|l|e|X|n|a|m|e|2| | +0#4040ff13#ffffff0@56
|
||||
|:+0#0000000&|e| |a|/|b|/|c|/> @65
|
||||
@@ -4859,4 +4859,34 @@ func Test_wildtrigger_update_screen()
|
||||
cnoremap <buffer> <F8> <C-R>=wildtrigger()[-1]<CR>
|
||||
endfunc
|
||||
|
||||
" Issue #17969: With 'noselect', the popup menu should appear next to the
|
||||
" environment variable being expanded. Disable 'showtail' when completing
|
||||
" file paths when 'noselect' is present.
|
||||
func Test_noselect_expand_env_var()
|
||||
CheckScreendump
|
||||
|
||||
let lines =<< trim [SCRIPT]
|
||||
set wildmenu wildoptions=pum wildmode=noselect,full
|
||||
let $TESTDIR = 'a/b'
|
||||
[SCRIPT]
|
||||
call writefile(lines, 'XTest_wildmenu', 'D')
|
||||
let buf = RunVimInTerminal('-S XTest_wildmenu', {'rows': 8})
|
||||
|
||||
call mkdir('a/b/c', 'pR')
|
||||
call writefile(['asdf'], 'a/b/fileXname1')
|
||||
call writefile(['foo'], 'a/b/fileXname2')
|
||||
|
||||
call term_sendkeys(buf, ":e $TESTDIR/\<Tab>")
|
||||
call VerifyScreenDump(buf, 'Test_expand_env_var_1', {})
|
||||
|
||||
call term_sendkeys(buf, "\<C-N>")
|
||||
call VerifyScreenDump(buf, 'Test_expand_env_var_2', {})
|
||||
|
||||
call term_sendkeys(buf, "\<C-P>")
|
||||
call VerifyScreenDump(buf, 'Test_expand_env_var_1', {})
|
||||
" clean up
|
||||
call term_sendkeys(buf, "\<Esc>")
|
||||
call StopVimInTerminal(buf)
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
||||
Reference in New Issue
Block a user