Mercurial > vim
diff src/testdir/test_search.vim @ 24745:b1fa3f005c93 v8.2.2911
patch 8.2.2911: pattern "%V" does not match all of block selection
Commit: https://github.com/vim/vim/commit/e71c0ebe2cee4a4916c49e206733200299e4c065
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun May 30 16:43:11 2021 +0200
patch 8.2.2911: pattern "\%V" does not match all of block selection
Problem: Pattern "\%V" does not match all of block selection. (Rick Howe)
Solution: Use the value of vi_curswant. (closes https://github.com/vim/vim/issues/8285)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 30 May 2021 16:45:03 +0200 |
parents | 97789fcef0cf |
children | eafc0e07b188 |
line wrap: on
line diff
--- a/src/testdir/test_search.vim +++ b/src/testdir/test_search.vim @@ -984,6 +984,26 @@ func Test_hlsearch_and_visual() call delete('Xhlvisual_script') endfunc +func Test_hlsearch_block_visual_match() + CheckScreendump + + let lines =<< trim END + set hlsearch + call setline(1, ['aa', 'bbbb', 'cccccc']) + END + call writefile(lines, 'Xhlsearch_block') + let buf = RunVimInTerminal('-S Xhlsearch_block', {'rows': 9, 'cols': 60}) + + call term_sendkeys(buf, "G\<C-V>$kk\<Esc>") + sleep 100m + call term_sendkeys(buf, "/\\%V\<CR>") + sleep 100m + call VerifyScreenDump(buf, 'Test_hlsearch_block_visual_match', {}) + + call StopVimInTerminal(buf) + call delete('Xhlsearch_block') +endfunc + func Test_incsearch_substitute() CheckOption incsearch