diff options
author | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2017-10-30 11:07:35 +0300 |
---|---|---|
committer | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2018-01-26 18:39:20 +0300 |
commit | 41394d82365b504c89bb4da9ed5adc11c6f619f0 (patch) | |
tree | c0632c87165c2a17e0a1df9b6de0d106565b9e0e /test | |
parent | 0a56bd33308d2c4ae45f261498d69cb44fbd13c8 (diff) | |
download | rneovim-41394d82365b504c89bb4da9ed5adc11c6f619f0.tar.gz rneovim-41394d82365b504c89bb4da9ed5adc11c6f619f0.tar.bz2 rneovim-41394d82365b504c89bb4da9ed5adc11c6f619f0.zip |
vim-patch:8.0.1238
Problem: Incremental search only shows one match.
Solution: When 'incsearch' and and 'hlsearch' are both set highlight all
matches. (haya14busa, closes vim/vim#2198)
https://github.com/vim/vim/commit/2e51d9a0972080b087d566608472928d5b7b35d7
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/ui/searchhl_spec.lua | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/test/functional/ui/searchhl_spec.lua b/test/functional/ui/searchhl_spec.lua index 5af8b83a36..950989aab2 100644 --- a/test/functional/ui/searchhl_spec.lua +++ b/test/functional/ui/searchhl_spec.lua @@ -99,7 +99,7 @@ describe('search highlighting', function() feed("gg/li") screen:expect([[ the first {3:li}ne | - in a little file | + in a {2:li}ttle file | | {1:~ }| {1:~ }| @@ -132,7 +132,7 @@ describe('search highlighting', function() feed("/fir") screen:expect([[ the {3:fir}st line | - in a {2:lit}tle file | + in a little file | | {1:~ }| {1:~ }| @@ -144,13 +144,25 @@ describe('search highlighting', function() feed("<esc>/ttle") screen:expect([[ the first line | - in a {2:li}{3:ttle} file | + in a li{3:ttle} file | | {1:~ }| {1:~ }| {1:~ }| /ttle^ | ]]) + + -- cancelling search resets to the old search term + feed('<esc>') + screen:expect([[ + the first line | + in a {2:^lit}tle file | + | + {1:~ }| + {1:~ }| + {1:~ }| + | + ]]) end) it('works with incsearch and offset', function() @@ -163,7 +175,7 @@ describe('search highlighting', function() feed("gg/mat/e") screen:expect([[ not the {3:mat}ch you're looking for | - the match is here | + the {2:mat}ch is here | {1:~ }| {1:~ }| {1:~ }| @@ -174,7 +186,7 @@ describe('search highlighting', function() -- Search with count and /e offset fixed in Vim patch 7.4.532. feed("<esc>2/mat/e") screen:expect([[ - not the match you're looking for | + not the {2:mat}ch you're looking for | the {3:mat}ch is here | {1:~ }| {1:~ }| |