diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-04-23 19:51:32 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-23 19:51:32 +0800 |
commit | a98cf154ed9a05f3a2bdfa6e354547c954d2f052 (patch) | |
tree | 9454df69215492ed28acb667022928e56344b0bf /test/functional | |
parent | 4e4914ab2e523f100c06fc5fb253f8625cc67232 (diff) | |
parent | 79ab277011e4668e2a6368be8ed908dc572af80f (diff) | |
download | rneovim-a98cf154ed9a05f3a2bdfa6e354547c954d2f052.tar.gz rneovim-a98cf154ed9a05f3a2bdfa6e354547c954d2f052.tar.bz2 rneovim-a98cf154ed9a05f3a2bdfa6e354547c954d2f052.zip |
Merge pull request #18226 from zeertzjq/vim-8.2.4805
vim-patch:8.2.{4805,4812}: CurSearch used for all matches in current line
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/ui/searchhl_spec.lua | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/test/functional/ui/searchhl_spec.lua b/test/functional/ui/searchhl_spec.lua index 84dc3c59bb..56ff8a4101 100644 --- a/test/functional/ui/searchhl_spec.lua +++ b/test/functional/ui/searchhl_spec.lua @@ -163,15 +163,25 @@ describe('search highlighting', function() end) it('works for multiline match', function() - command([[call setline(1, ['one', 'foo', 'bar', 'baz', 'foo', 'bar'])]]) + command([[call setline(1, ['one', 'foo', 'bar', 'baz', 'foo the foo and foo', 'bar'])]]) feed('gg/foo<CR>') screen:expect([[ one | {2:^foo} | bar | baz | + {1:foo} the {1:foo} and {1:foo} | + bar | + /foo | + ]]) + feed('n') + screen:expect([[ + one | {1:foo} | bar | + baz | + {2:^foo} the {1:foo} and {1:foo} | + bar | /foo | ]]) feed('n') @@ -180,11 +190,22 @@ describe('search highlighting', function() {1:foo} | bar | baz | - {2:^foo} | + {1:foo} the {2:^foo} and {1:foo} | + bar | + /foo | + ]]) + feed('n') + screen:expect([[ + one | + {1:foo} | + bar | + baz | + {1:foo} the {1:foo} and {2:^foo} | bar | /foo | ]]) - feed('?<CR>') + command([[call setline(5, 'foo')]]) + feed('0?<CR>') screen:expect([[ one | {2:^foo} | |