comparison src/testdir/test_ins_complete.vim @ 26831:537fdb6653a9 v8.2.3944

patch 8.2.3944: insert mode completion functions are too long Commit: https://github.com/vim/vim/commit/5d2e007ccbfbd749a1f201d06965b8811ff50e6e Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Thu Dec 30 11:40:53 2021 +0000 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 #9431)
author Bram Moolenaar <Bram@vim.org>
date Thu, 30 Dec 2021 12:45:03 +0100
parents a8ded20a59e6
children b975b7c16ba1
comparison
equal deleted inserted replaced
26830:13ecf040b431 26831:537fdb6653a9
898 delfunc Save_mode1 898 delfunc Save_mode1
899 delfunc Save_mode2 899 delfunc Save_mode2
900 close! 900 close!
901 endfunc 901 endfunc
902 902
903 " Test for typing CTRL-R in insert completion mode to insert a register
904 " content.
905 func Test_complete_reginsert()
906 new
907 call setline(1, ['a1', 'a12', 'a123', 'a1234'])
908
909 " if a valid CTRL-X mode key is returned from <C-R>=, then it should be
910 " processed. Otherwise, CTRL-X mode should be stopped and the key should be
911 " inserted.
912 exe "normal Goa\<C-P>\<C-R>=\"\\<C-P>\"\<CR>"
913 call assert_equal('a123', getline(5))
914 let @r = "\<C-P>\<C-P>"
915 exe "normal GCa\<C-P>\<C-R>r"
916 call assert_equal('a12', getline(5))
917 exe "normal GCa\<C-P>\<C-R>=\"x\"\<CR>"
918 call assert_equal('a1234x', getline(5))
919 bw!
920 endfunc
921
903 func Test_issue_7021() 922 func Test_issue_7021()
904 CheckMSWindows 923 CheckMSWindows
905 924
906 let orig_shellslash = &shellslash 925 let orig_shellslash = &shellslash
907 set noshellslash 926 set noshellslash