From 919934177d6f3149b523c476ab41c37e1ba51034 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sun, 10 Nov 2024 19:38:46 +0100 Subject: [PATCH] Update line highlighting test Commit 8c49c8ee4 (Highlight all atoms for the line regardless of has_buffer_range, 2024-11-04) intentionally changes the behavior to also highlight outside the buffer, painting over number-lines. Let's use a final face as suggested to restore the test's previous behavior, fixing the failure. --- test/regression/5001-line-highlighting-breaks-at-region/rc | 2 ++ test/regression/5001-line-highlighting-breaks-at-region/script | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/test/regression/5001-line-highlighting-breaks-at-region/rc b/test/regression/5001-line-highlighting-breaks-at-region/rc index 78060e1cf..bd8b4cfb2 100644 --- a/test/regression/5001-line-highlighting-breaks-at-region/rc +++ b/test/regression/5001-line-highlighting-breaks-at-region/rc @@ -2,4 +2,6 @@ add-highlighter window/test regions add-highlighter window/test/macro region %{#} %{(?=\\n)} group add-highlighter window/test/code default-region group add-highlighter window/ number-lines +face global LineNumbers default,default+F +face global LineNumberCursor default,default+rF add-highlighter window/ line 2 ,red diff --git a/test/regression/5001-line-highlighting-breaks-at-region/script b/test/regression/5001-line-highlighting-breaks-at-region/script index f696b0d13..89885a7dd 100644 --- a/test/regression/5001-line-highlighting-breaks-at-region/script +++ b/test/regression/5001-line-highlighting-breaks-at-region/script @@ -1,2 +1,2 @@ ui_out -ignore 1 -ui_out '{ "jsonrpc": "2.0", "method": "draw", "params": [[[{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " 1│" }, { "face": { "fg": "black", "bg": "white", "underline": "default", "attributes": [] }, "contents": "#" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "foo\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": " 2│" }, { "face": { "fg": "default", "bg": "red", "underline": "default", "attributes": [] }, "contents": "bar\u000a" }, { "face": { "fg": "default", "bg": "red", "underline": "default", "attributes": [] }, "contents": " " }]], { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, { "fg": "blue", "bg": "default", "underline": "default", "attributes": [] }] }' +ui_out '{ "jsonrpc": "2.0", "method": "draw", "params": [[[{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": ["final_fg","final_bg","final_attr"] }, "contents": " 1│" }, { "face": { "fg": "black", "bg": "white", "underline": "default", "attributes": [] }, "contents": "#" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "foo\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": ["final_fg","final_bg","final_attr"] }, "contents": " 2│" }, { "face": { "fg": "default", "bg": "red", "underline": "default", "attributes": [] }, "contents": "bar\u000a" }, { "face": { "fg": "default", "bg": "red", "underline": "default", "attributes": [] }, "contents": " " }]], { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, { "fg": "blue", "bg": "default", "underline": "default", "attributes": [] }] }'