diff options
author | matveyt <matthewtarasov@yandex.ru> | 2022-09-06 17:00:15 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-09-06 17:00:15 +0100 |
commit | 2834ebdee473c838e50e60d0aa160f0e62fc8ef9 (patch) | |
tree | 3c5d2b3a0e3f0c261d5569e5eb96eb5eeec88349 /src/testdir/test_gui.vim | |
parent | 635bb4908577738c5658a95672259b8537d97d49 (diff) |
patch 9.0.0396: :findrepl does not escape '&' and '~' properlyv9.0.0396
Problem: :findrepl does not escape '&' and '~' properly.
Solution: Escape depending on the value of 'magic'. (closes #11067)
Diffstat (limited to 'src/testdir/test_gui.vim')
-rw-r--r-- | src/testdir/test_gui.vim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/testdir/test_gui.vim b/src/testdir/test_gui.vim index 29e4ecdd5b..a2491458dd 100644 --- a/src/testdir/test_gui.vim +++ b/src/testdir/test_gui.vim @@ -1580,6 +1580,12 @@ func Test_gui_findrepl() call test_gui_event('findrepl', args) call assert_equal(['ONE two ONE', 'Twoo ONE two ONEo'], getline(1, '$')) + " Replace all instances with sub-replace specials + call cursor(1, 1) + let args = #{find_text: 'ONE', repl_text: '&~&', flags: 0x4, forward: 1} + call test_gui_event('findrepl', args) + call assert_equal(['&~& two &~&', 'Twoo &~& two &~&o'], getline(1, '$')) + " Invalid arguments call assert_false(test_gui_event('findrepl', {})) let args = #{repl_text: 'a', flags: 1, forward: 1} |