diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2023-02-11 18:44:06 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2023-02-11 19:04:27 +0800 |
| commit | 9437800d280385c018a99aa0fbe9043e4d7715aa (patch) | |
| tree | 7df9e0e7074f22cd9642c064f782f86373ec3107 /src/nvim/testdir | |
| parent | 7d58de11f49c574a8a305e28e96b9ff810493012 (diff) | |
| download | rneovim-9437800d280385c018a99aa0fbe9043e4d7715aa.tar.gz rneovim-9437800d280385c018a99aa0fbe9043e4d7715aa.tar.bz2 rneovim-9437800d280385c018a99aa0fbe9043e4d7715aa.zip | |
vim-patch:9.0.1298: inserting register on the cmdline does not trigger incsearch
Problem: Inserting a register on the command line does not trigger
incsearch or update hlsearch.
Solution: Have cmdline_insert_reg() return CMDLINE_CHANGED when appropriate
and handle it correctly. (Ken Takata, closes vim/vim#11960)
https://github.com/vim/vim/commit/c4b7dec38292fe1cfad7aa5f244031fc6f7c7a09
Co-authored-by: K.Takata <kentkt@csc.jp>
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_hlsearch.vim | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_hlsearch.vim b/src/nvim/testdir/test_hlsearch.vim index cf2791113a..043d378a39 100644 --- a/src/nvim/testdir/test_hlsearch.vim +++ b/src/nvim/testdir/test_hlsearch.vim @@ -1,5 +1,8 @@ " Test for v:hlsearch +source check.vim +source screendump.vim + func Test_hlsearch() new call setline(1, repeat(['aaa'], 10)) @@ -63,3 +66,23 @@ func Test_hlsearch_eol_highlight() set nohlsearch bwipe! endfunc + +func Test_hlsearch_Ctrl_R() + CheckRunVimInTerminal + + let lines =<< trim END + set incsearch hlsearch + let @" = "text" + put + END + call writefile(lines, 'XhlsearchCtrlR', 'D') + let buf = RunVimInTerminal('-S XhlsearchCtrlR', #{rows: 6, cols: 60}) + + call term_sendkeys(buf, "/\<C-R>\<C-R>\"") + call VerifyScreenDump(buf, 'Test_hlsearch_ctrlr_1', {}) + + call term_sendkeys(buf, "\<Esc>") + call StopVimInTerminal(buf) +endfunc + +" vim: shiftwidth=2 sts=2 expandtab |