diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2021-12-30 11:40:53 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-12-30 11:40:53 +0000 |
commit | 5d2e007ccbfbd749a1f201d06965b8811ff50e6e (patch) | |
tree | cd809a9394828e20fc4589ef98233c00200272da /src/testdir/test_ins_complete.vim | |
parent | 491669701c72578f273db53e579d8a03a9deac0c (diff) |
patch 8.2.3944: insert mode completion functions are too longv8.2.3944
Problem: Insert mode completion functions are too long.
Solution: Split up into multiple functions. (Yegappan Lakshmanan,
closes #9431)
Diffstat (limited to 'src/testdir/test_ins_complete.vim')
-rw-r--r-- | src/testdir/test_ins_complete.vim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/testdir/test_ins_complete.vim b/src/testdir/test_ins_complete.vim index 638a774d30..b0b97bbc22 100644 --- a/src/testdir/test_ins_complete.vim +++ b/src/testdir/test_ins_complete.vim @@ -900,6 +900,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 |