From 2d5dd85eef3be0a0a4073964ddbb849c586bc6a1 Mon Sep 17 00:00:00 2001 From: shade-of-noon <73705427+shade-of-noon@users.noreply.github.com> Date: Wed, 25 Nov 2020 11:47:03 -0400 Subject: screen.c: Allow showbreak to override cursorline. (#13372) I also added relevant tests. Close #13369 --- src/nvim/screen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 425458f210..4373d6d5a8 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -2836,9 +2836,9 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, * required when 'linebreak' is also set. */ if (tocol == vcol) tocol += n_extra; - /* combine 'showbreak' with 'cursorline' */ + // Combine 'showbreak' with 'cursorline', prioritizing 'showbreak'. if (wp->w_p_cul && lnum == wp->w_cursor.lnum) { - char_attr = hl_combine_attr(char_attr, win_hl_attr(wp, HLF_CUL)); + char_attr = hl_combine_attr(win_hl_attr(wp, HLF_CUL), char_attr); } } } -- cgit