From db294adc65d73ffa5cdf3d0ab45ccbf05b965414 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 6 Jun 2019 12:49:29 +0200 Subject: 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 #4488, closes #4489) --- src/testdir/test_search.vim | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/testdir') diff --git a/src/testdir/test_search.vim b/src/testdir/test_search.vim index d59f39dc7e..8090deeeb7 100644 --- a/src/testdir/test_search.vim +++ b/src/testdir/test_search.vim @@ -1289,3 +1289,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 v1.2.3