From 25992df761f24546df69aa01fd03d0ae96e96fbe Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 13 Sep 2020 01:52:24 -0400 Subject: vim-patch:8.1.1148: CTRL-L with 'incsearch' does not pick up char under cursor Problem: CTRL-L with 'incsearch' does not pick up char under cursor. (Smylers) Solution: Do not compare the position with the cursor position. (Hirohito Higashi, closes vim/vim#3620) https://github.com/vim/vim/commit/730f48fe3691dc62331f3df23cb947bfc33a5add --- src/nvim/testdir/test_search.vim | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_search.vim b/src/nvim/testdir/test_search.vim index a945304e78..01580d756c 100644 --- a/src/nvim/testdir/test_search.vim +++ b/src/nvim/testdir/test_search.vim @@ -1068,6 +1068,24 @@ func Test_one_error_msg() call assert_fails('call search(" \\((\\v[[=P=]]){185}+ ")', 'E871:') endfunc +func Test_incsearch_add_char_under_cursor() + throw 'skipped: Nvim does not support test_override()' + if !exists('+incsearch') + return + endif + set incsearch + new + call setline(1, ['find match', 'anything']) + 1 + call test_override('char_avail', 1) + call feedkeys("fc/m\\\\\\", 'tx') + call assert_equal('match', @/) + call test_override('char_avail', 0) + + set incsearch& + bwipe! +endfunc + " Test for the search() function with match at the cursor position func Test_search_match_at_curpos() new -- cgit