diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-08-24 13:15:38 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-08-24 15:47:15 +0800 |
commit | 9ac44c7f5daf28cd155942dbc697b51c6b3afdc0 (patch) | |
tree | ba75c2b069204fa95045ea9b2b9f5b44fe9a9fc5 /src/nvim/testdir | |
parent | ef748af01d4f34766b95e7470fb0c6bf23bf17ad (diff) | |
download | rneovim-9ac44c7f5daf28cd155942dbc697b51c6b3afdc0.tar.gz rneovim-9ac44c7f5daf28cd155942dbc697b51c6b3afdc0.tar.bz2 rneovim-9ac44c7f5daf28cd155942dbc697b51c6b3afdc0.zip |
vim-patch:8.2.3944: insert mode completion functions are too long
Problem: Insert mode completion functions are too long.
Solution: Split up into multiple functions. (Yegappan Lakshmanan,
closes vim/vim#9431)
https://github.com/vim/vim/commit/5d2e007ccbfbd749a1f201d06965b8811ff50e6e
Cherry-pick can_cindent_get() -> get_can_cindent() from patch 8.1.2062.
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r-- | src/nvim/testdir/test_ins_complete.vim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_ins_complete.vim b/src/nvim/testdir/test_ins_complete.vim index 4cdede9cd0..6f5f72e1ed 100644 --- a/src/nvim/testdir/test_ins_complete.vim +++ b/src/nvim/testdir/test_ins_complete.vim @@ -873,6 +873,25 @@ func Test_complete_stop() close! endfunc +" Test for typing CTRL-R in insert completion mode to insert a register +" content. +func Test_complete_reginsert() + new + call setline(1, ['a1', 'a12', 'a123', 'a1234']) + + " if a valid CTRL-X mode key is returned from <C-R>=, then it should be + " processed. Otherwise, CTRL-X mode should be stopped and the key should be + " inserted. + exe "normal Goa\<C-P>\<C-R>=\"\\<C-P>\"\<CR>" + call assert_equal('a123', getline(5)) + let @r = "\<C-P>\<C-P>" + exe "normal GCa\<C-P>\<C-R>r" + call assert_equal('a12', getline(5)) + exe "normal GCa\<C-P>\<C-R>=\"x\"\<CR>" + call assert_equal('a1234x', getline(5)) + bw! +endfunc + func Test_issue_7021() CheckMSWindows |