aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/highlight_spec.lua
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2023-05-24 14:33:09 +0200
committerbfredl <bjorn.linse@gmail.com>2023-05-25 18:40:26 +0200
commit455bca1ba86a2524251fea6f79ef668c1e38f6aa (patch)
tree65da4527dd3cc5dd31927d865bf2d76f8ffc0972 /test/functional/ui/highlight_spec.lua
parentaa9d46b6724cf3454aca602e64350856827c3ab8 (diff)
downloadrneovim-455bca1ba86a2524251fea6f79ef668c1e38f6aa.tar.gz
rneovim-455bca1ba86a2524251fea6f79ef668c1e38f6aa.tar.bz2
rneovim-455bca1ba86a2524251fea6f79ef668c1e38f6aa.zip
fix(drawline): combine extmark highligh with area hl correctly
fixes #23734 Get rid of the weird attr_pri dance which always seemed like a kludge: if (!attr_pri) { wlv.char_attr = hl_combine_attr(wlv.char_attr, extmark_attr); } else { wlv.char_attr = hl_combine_attr(extmark_attr, wlv.char_attr); } Instead combine extmark attrs with (old-skool) syntax attrs in a consistent way and then combine that with attr_pri and the rest in an _unified_ code path fixes #23722 Co-authored-by: luukvbaal <luukvbaal@gmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Diffstat (limited to 'test/functional/ui/highlight_spec.lua')
-rw-r--r--test/functional/ui/highlight_spec.lua35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/functional/ui/highlight_spec.lua b/test/functional/ui/highlight_spec.lua
index 89b503141b..9a4be4573c 100644
--- a/test/functional/ui/highlight_spec.lua
+++ b/test/functional/ui/highlight_spec.lua
@@ -526,6 +526,41 @@ describe('highlight', function()
})
end)
+
+ it("'diff', syntax and extmark", function()
+ local screen = Screen.new(25,10)
+ screen:attach()
+ exec([[
+ new
+ call setline(1, ['', '01234 6789'])
+ windo diffthis
+ wincmd w
+ syn match WarningMsg "^.*$"
+ call nvim_buf_add_highlight(0, -1, 'ErrorMsg', 1, 2, 8)
+ ]])
+ screen:expect([[
+ {1: }^ |
+ {1: }{2:01}{3:234 67}{2:89}{5: }|
+ {4:~ }|
+ {4:~ }|
+ {7:[No Name] [+] }|
+ {1: } |
+ {1: }{6:-----------------------}|
+ {4:~ }|
+ {8:[No Name] }|
+ |
+ ]],{
+ [0] = {Screen.colors.WebGray, foreground = Screen.colors.DarkBlue},
+ [1] = {background = Screen.colors.Grey, foreground = Screen.colors.Blue4},
+ [2] = {foreground = Screen.colors.Red, background = Screen.colors.LightBlue},
+ [3] = {foreground = Screen.colors.Grey100, background = Screen.colors.LightBlue},
+ [4] = {bold = true, foreground = Screen.colors.Blue},
+ [5] = {background = Screen.colors.LightBlue},
+ [6] = {bold = true, background = Screen.colors.LightCyan, foreground = Screen.colors.Blue1},
+ [7] = {reverse = true, bold = true},
+ [8] = {reverse = true},
+ })
+ end)
end)
describe("'listchars' highlight", function()