diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-11-24 18:37:52 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-11-24 18:52:27 +0800 |
commit | 81c87857f632d1afe147e9b77a97da38f8f3a887 (patch) | |
tree | b9fbaa4fbc0bc9f8b89249574ccc92da2ec97552 /test | |
parent | 868d8d69627c4b8fd5225da0dff5905f75645946 (diff) | |
download | rneovim-81c87857f632d1afe147e9b77a97da38f8f3a887.tar.gz rneovim-81c87857f632d1afe147e9b77a97da38f8f3a887.tar.bz2 rneovim-81c87857f632d1afe147e9b77a97da38f8f3a887.zip |
vim-patch:8.2.3698: match highlighting continues over breakindent
Problem: Match highlighting continues over breakindent.
Solution: Stop before the end column. (closes vim/vim#9242)
https://github.com/vim/vim/commit/0c359af5c0fd106d3f57cc0bb7cef1c89b5e1e10
Cherry-pick Test_matchdelete_redraw() from patch 8.2.1077.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/legacy/match_spec.lua | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/functional/legacy/match_spec.lua b/test/functional/legacy/match_spec.lua index 271f844f9d..eab2bff70a 100644 --- a/test/functional/legacy/match_spec.lua +++ b/test/functional/legacy/match_spec.lua @@ -36,3 +36,32 @@ describe('matchaddpos()', function() ]]) end) end) + +describe('match highlighting', function() + -- oldtest: Test_match_in_linebreak() + it('does not continue in linebreak vim-patch:8.2.3698', function() + local screen = Screen.new(75, 10) + screen:set_default_attr_ids({ + [0] = {bold = true, foreground = Screen.colors.Blue}, -- NonText + [1] = {background = Screen.colors.Red, foreground = Screen.colors.White}, -- ErrorMsg + }) + screen:attach() + exec([=[ + set breakindent linebreak breakat+=] + call printf('%s]%s', repeat('x', 50), repeat('x', 70))->setline(1) + call matchaddpos('ErrorMsg', [[1, 51]]) + ]=]) + screen:expect([[ + ^xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx{1:]} | + xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + | + ]]) + end) +end) |