From 2a4e8a427e5e84f8e8a9477c0bfb8c1d376b3f1e Mon Sep 17 00:00:00 2001 From: erw7 Date: Fri, 7 Jun 2019 09:03:15 +0900 Subject: vim-patch:8.1.1475: search string not displayed when 'rightleft' is set Problem: Search string not displayed when 'rightleft' is set. Solution: Clear the right part of the old text. (closes vim/vim#4488, closes vim/vim#4489) https://github.com/vim/vim/commit/db294adc65d73ffa5cdf3d0ab45ccbf05b965414 --- src/nvim/testdir/test_search.vim | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_search.vim b/src/nvim/testdir/test_search.vim index f4fe4051e3..87cad241e2 100644 --- a/src/nvim/testdir/test_search.vim +++ b/src/nvim/testdir/test_search.vim @@ -609,3 +609,25 @@ func Test_search_match_at_curpos() close! endfunc + +func Test_search_display_pattern() + new + call setline(1, ['foo', 'bar', 'foobar']) + + call cursor(1, 1) + let @/ = 'foo' + let pat = escape(@/, '()*?'. '\s\+') + let g:a = execute(':unsilent :norm! n') + call assert_match(pat, g:a) + + " right-left + if exists("+rightleft") + set rl + call cursor(1, 1) + let @/ = 'foo' + let pat = 'oof/\s\+' + let g:a = execute(':unsilent :norm! n') + call assert_match(pat, g:a) + set norl + endif +endfunc -- cgit