diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-06-06 12:49:29 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-06-06 12:49:29 +0200 |
commit | db294adc65d73ffa5cdf3d0ab45ccbf05b965414 (patch) | |
tree | b10feaaa11f172b219b2479623dfd62b571d633a /src/testdir | |
parent | 9aeb33639f49511cc16962a11a40844693ddb15e (diff) |
patch 8.1.1475: search string not displayed when 'rightleft' is setv8.1.1475
Problem: Search string not displayed when 'rightleft' is set.
Solution: Clear the right part of the old text. (closes #4488, closes #4489)
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_search.vim | 22 |
1 files changed, 22 insertions, 0 deletions
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 |