aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-10-25 12:38:52 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-10-25 12:48:37 -0400
commita868cd920a69e55284c0b8137d349e91f0b8f742 (patch)
treea932e676326bd98c3c74f63694fb11c3417cbaa3 /src/nvim/testdir
parent36f78412f9f286e5f850cb89630f8fe57fe5a54f (diff)
downloadrneovim-a868cd920a69e55284c0b8137d349e91f0b8f742.tar.gz
rneovim-a868cd920a69e55284c0b8137d349e91f0b8f742.tar.bz2
rneovim-a868cd920a69e55284c0b8137d349e91f0b8f742.zip
vim-patch:8.2.1901: variable completion does not work in command line window
Problem: Variable completion does not work in command line window. Solution: Use the "prevwin". (closes vim/vim#7198) https://github.com/vim/vim/commit/4ff2f2fb6bef01a06bd726bae8dfa8dd6355d594 N/A patches for version.c: vim-patch:8.2.1899: crash in out-of-memory situation Problem: Crash in out-of-memory situation. Solution: Bail out if shell_name is NULL. (Dominique Pellé, closes vim/vim#7196) https://github.com/vim/vim/commit/67def64a4e4590a5f3b55ebfc33c42a3dcd7b559
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_ins_complete.vim24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_ins_complete.vim b/src/nvim/testdir/test_ins_complete.vim
index 1339a9f25d..b8632b9595 100644
--- a/src/nvim/testdir/test_ins_complete.vim
+++ b/src/nvim/testdir/test_ins_complete.vim
@@ -327,7 +327,10 @@ func Test_compl_in_cmdwin()
set wildmenu wildchar=<Tab>
com! -nargs=1 -complete=command GetInput let input = <q-args>
com! -buffer TestCommand echo 'TestCommand'
+ let w:test_winvar = 'winvar'
+ let b:test_bufvar = 'bufvar'
+ " User-defined commands
let input = ''
call feedkeys("q:iGetInput T\<C-x>\<C-v>\<CR>", 'tx!')
call assert_equal('TestCommand', input)
@@ -336,8 +339,29 @@ func Test_compl_in_cmdwin()
call feedkeys("q::GetInput T\<Tab>\<CR>:q\<CR>", 'tx!')
call assert_equal('T', input)
+ com! -nargs=1 -complete=var GetInput let input = <q-args>
+ " Window-local variables
+ let input = ''
+ call feedkeys("q:iGetInput w:test_\<C-x>\<C-v>\<CR>", 'tx!')
+ call assert_equal('w:test_winvar', input)
+
+ let input = ''
+ call feedkeys("q::GetInput w:test_\<Tab>\<CR>:q\<CR>", 'tx!')
+ call assert_equal('w:test_', input)
+
+ " Buffer-local variables
+ let input = ''
+ call feedkeys("q:iGetInput b:test_\<C-x>\<C-v>\<CR>", 'tx!')
+ call assert_equal('b:test_bufvar', input)
+
+ let input = ''
+ call feedkeys("q::GetInput b:test_\<Tab>\<CR>:q\<CR>", 'tx!')
+ call assert_equal('b:test_', input)
+
delcom TestCommand
delcom GetInput
+ unlet w:test_winvar
+ unlet b:test_bufvar
set wildmenu& wildchar&
endfunc