Mercurial > vim
diff src/testdir/test_search.vim @ 16949:a32169a40566 v8.1.1475
patch 8.1.1475: search string not displayed when 'rightleft' is set
commit https://github.com/vim/vim/commit/db294adc65d73ffa5cdf3d0ab45ccbf05b965414
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jun 6 12:49:29 2019 +0200
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 https://github.com/vim/vim/issues/4488, closes https://github.com/vim/vim/issues/4489)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 06 Jun 2019 13:00:05 +0200 |
parents | aebcd20a8a3f |
children | ba7727889385 |
line wrap: on
line diff
--- 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