diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2023-05-30 07:18:12 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-30 07:18:12 +0800 |
| commit | 55f6a1cab031ecc28c5a7f2558a0cac9df2145e1 (patch) | |
| tree | a1de3a75f54b7a728fa846f6d4c2df3276e4a424 /test/functional | |
| parent | e8776074f50593df90402a3642236990edfba6f0 (diff) | |
| download | rneovim-55f6a1cab031ecc28c5a7f2558a0cac9df2145e1.tar.gz rneovim-55f6a1cab031ecc28c5a7f2558a0cac9df2145e1.tar.bz2 rneovim-55f6a1cab031ecc28c5a7f2558a0cac9df2145e1.zip | |
vim-patch:9.0.1588: Incsearch not triggered when pasting clipboard register (#23817)
Problem: Incsearch not triggered when pasting clipboard register on the
command line.
Solution: Also set "literally" when using a clipboard register. (Ken Takata,
closes vim/vim#12460)
https://github.com/vim/vim/commit/9cf6ab133227ac7e9169941752293bb7178d8e38
Co-authored-by: K.Takata <kentkt@csc.jp>
Diffstat (limited to 'test/functional')
| -rw-r--r-- | test/functional/autocmd/textyankpost_spec.lua | 2 | ||||
| -rw-r--r-- | test/functional/provider/clipboard_spec.lua | 2 | ||||
| -rw-r--r-- | test/functional/provider/provider_spec.lua | 2 | ||||
| -rw-r--r-- | test/functional/ui/searchhl_spec.lua | 30 | ||||
| -rw-r--r-- | test/functional/vimscript/api_functions_spec.lua | 2 |
5 files changed, 34 insertions, 4 deletions
diff --git a/test/functional/autocmd/textyankpost_spec.lua b/test/functional/autocmd/textyankpost_spec.lua index 3898d59e58..1640916ad8 100644 --- a/test/functional/autocmd/textyankpost_spec.lua +++ b/test/functional/autocmd/textyankpost_spec.lua @@ -8,7 +8,7 @@ describe('TextYankPost', function() clear() -- emulate the clipboard so system clipboard isn't affected - command('let &rtp = "test/functional/fixtures,".&rtp') + command('set rtp^=test/functional/fixtures') command('let g:count = 0') command('autocmd TextYankPost * let g:event = copy(v:event)') diff --git a/test/functional/provider/clipboard_spec.lua b/test/functional/provider/clipboard_spec.lua index 2c5185a974..c8f1518283 100644 --- a/test/functional/provider/clipboard_spec.lua +++ b/test/functional/provider/clipboard_spec.lua @@ -301,7 +301,7 @@ end) describe('clipboard (with fake clipboard.vim)', function() local function reset(...) - clear('--cmd', 'let &rtp = "test/functional/fixtures,".&rtp', ...) + clear('--cmd', 'set rtp^=test/functional/fixtures', ...) end before_each(function() diff --git a/test/functional/provider/provider_spec.lua b/test/functional/provider/provider_spec.lua index 3895b8613f..b1c326d04c 100644 --- a/test/functional/provider/provider_spec.lua +++ b/test/functional/provider/provider_spec.lua @@ -7,7 +7,7 @@ local pcall_err = helpers.pcall_err describe('providers', function() before_each(function() - clear('--cmd', 'let &rtp = "test/functional/fixtures,".&rtp') + clear('--cmd', 'set rtp^=test/functional/fixtures') end) it('with #Call(), missing g:loaded_xx_provider', function() diff --git a/test/functional/ui/searchhl_spec.lua b/test/functional/ui/searchhl_spec.lua index 3c8dceb8cb..1e42689200 100644 --- a/test/functional/ui/searchhl_spec.lua +++ b/test/functional/ui/searchhl_spec.lua @@ -512,6 +512,36 @@ describe('search highlighting', function() {1:~ }│{1:~ }| /file^ | ]]) + feed('<Esc>') + + command('set rtp^=test/functional/fixtures') + -- incsearch works after c_CTRL-R inserts clipboard register + + command('let @* = "first"') + feed('/<C-R>*') + screen:expect([[ + the {3:first} line │the {2:first} line | + in a little file │in a little file | + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + /first^ | + ]]) + feed('<Esc>') + + command('let @+ = "little"') + feed('/<C-R>+') + screen:expect([[ + the first line │the first line | + in a {3:little} file │in a {2:little} file | + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + /little^ | + ]]) + feed('<Esc>') end) it('works with incsearch and offset', function() diff --git a/test/functional/vimscript/api_functions_spec.lua b/test/functional/vimscript/api_functions_spec.lua index 3404b06a55..14678a966d 100644 --- a/test/functional/vimscript/api_functions_spec.lua +++ b/test/functional/vimscript/api_functions_spec.lua @@ -133,7 +133,7 @@ describe('eval-API', function() }) command("set ft=vim") - command("let &rtp='build/runtime/,'.&rtp") + command("set rtp^=build/runtime/") command("syntax on") insert([[ call bufnr('%') |