diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2018-01-31 16:17:05 +0100 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2018-12-12 10:25:36 +0100 |
commit | 6c602be33a5176fd1101e8cff45dd2a85b0e512e (patch) | |
tree | c8e89b4648a1c9990f043a6015bd19bddb944ddf /src/nvim/testdir | |
parent | b9a441eb78349088d54eaa6e12c35aa06f0b1c6b (diff) | |
download | rneovim-6c602be33a5176fd1101e8cff45dd2a85b0e512e.tar.gz rneovim-6c602be33a5176fd1101e8cff45dd2a85b0e512e.tar.bz2 rneovim-6c602be33a5176fd1101e8cff45dd2a85b0e512e.zip |
vim-patch:8.0.1445: cannot act on edits in the command line
Problem: Cannot act on edits in the command line.
Solution: Add the CmdlineChanged autocommand event. (xtal8, closes vim/vim#2603,
closes vim/vim#2524)
https://github.com/vim/vim/commit/153b704e20f9c269450a7d3ea8cafcf942579ab7
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r-- | src/nvim/testdir/test_autocmd.vim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_autocmd.vim b/src/nvim/testdir/test_autocmd.vim index 9e8d2081c8..5deb789f48 100644 --- a/src/nvim/testdir/test_autocmd.vim +++ b/src/nvim/testdir/test_autocmd.vim @@ -818,6 +818,18 @@ func Test_QuitPre() endfunc func Test_Cmdline() + au! CmdlineChanged : let g:text = getcmdline() + let g:text = 0 + call feedkeys(":echom 'hello'\<CR>", 'xt') + call assert_equal("echom 'hello'", g:text) + au! CmdlineChanged + + au! CmdlineChanged : let g:entered = expand('<afile>') + let g:entered = 0 + call feedkeys(":echom 'hello'\<CR>", 'xt') + call assert_equal(':', g:entered) + au! CmdlineChanged + au! CmdlineEnter : let g:entered = expand('<afile>') au! CmdlineLeave : let g:left = expand('<afile>') let g:entered = 0 |