Mercurial > vim
comparison src/testdir/test_search.vim @ 19475:5512aa74cb62 v8.2.0295
patch 8.2.0295: highlighting for :s wrong when using different separator
Commit: https://github.com/vim/vim/commit/c036e87bd7001238ab7cc5d9e30e59bbf989a5fd
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Feb 21 21:30:52 2020 +0100
patch 8.2.0295: highlighting for :s wrong when using different separator
Problem: Highlighting for :s wrong when using different separator.
Solution: Use separat argument for search direction and separator. (Rob
Pilling, closes #5665)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 21 Feb 2020 21:45:04 +0100 |
parents | 8f8a5a15d00a |
children | 599793519c85 |
comparison
equal
deleted
inserted
replaced
19474:3e0b71dd3dc5 | 19475:5512aa74cb62 |
---|---|
1080 call VerifyScreenDump(buf, 'Test_incsearch_substitute_14', {}) | 1080 call VerifyScreenDump(buf, 'Test_incsearch_substitute_14', {}) |
1081 call term_sendkeys(buf, "<Esc>") | 1081 call term_sendkeys(buf, "<Esc>") |
1082 | 1082 |
1083 call StopVimInTerminal(buf) | 1083 call StopVimInTerminal(buf) |
1084 call delete('Xis_subst_script') | 1084 call delete('Xis_subst_script') |
1085 endfunc | |
1086 | |
1087 func Test_incsearch_highlighting() | |
1088 if !exists('+incsearch') | |
1089 return | |
1090 endif | |
1091 if !CanRunVimInTerminal() | |
1092 throw 'Skipped: cannot make screendumps' | |
1093 endif | |
1094 | |
1095 call writefile([ | |
1096 \ 'set incsearch hlsearch', | |
1097 \ 'call setline(1, "hello/there")', | |
1098 \ ], 'Xis_subst_hl_script') | |
1099 let buf = RunVimInTerminal('-S Xis_subst_hl_script', {'rows': 4, 'cols': 20}) | |
1100 " Give Vim a chance to redraw to get rid of the spaces in line 2 caused by | |
1101 " the 'ambiwidth' check. | |
1102 sleep 300m | |
1103 | |
1104 " Using a different search delimiter should still highlight matches | |
1105 " that contain a '/'. | |
1106 call term_sendkeys(buf, ":%s;ello/the") | |
1107 call VerifyScreenDump(buf, 'Test_incsearch_substitute_15', {}) | |
1108 call term_sendkeys(buf, "<Esc>") | |
1085 endfunc | 1109 endfunc |
1086 | 1110 |
1087 func Test_incsearch_with_change() | 1111 func Test_incsearch_with_change() |
1088 if !has('timers') || !exists('+incsearch') || !CanRunVimInTerminal() | 1112 if !has('timers') || !exists('+incsearch') || !CanRunVimInTerminal() |
1089 throw 'Skipped: cannot make screendumps and/or timers feature and/or incsearch option missing' | 1113 throw 'Skipped: cannot make screendumps and/or timers feature and/or incsearch option missing' |