diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/highlight_defs.h | 6 | ||||
-rw-r--r-- | src/nvim/screen.c | 5 | ||||
-rw-r--r-- | src/nvim/syntax.c | 1 |
3 files changed, 7 insertions, 5 deletions
diff --git a/src/nvim/highlight_defs.h b/src/nvim/highlight_defs.h index 0790793c94..40025fcbbb 100644 --- a/src/nvim/highlight_defs.h +++ b/src/nvim/highlight_defs.h @@ -22,7 +22,7 @@ typedef enum { /// Stores a complete highlighting entry, including colors and attributes /// for both TUI and GUI. typedef struct attr_entry { - int16_t rgb_ae_attr, cterm_ae_attr; // HL_BOLD, etc. + int16_t rgb_ae_attr, cterm_ae_attr; ///< HlAttrFlags RgbValue rgb_fg_color, rgb_bg_color, rgb_sp_color; int cterm_fg_color, cterm_bg_color; } HlAttrs; @@ -83,8 +83,8 @@ typedef enum { , HLF_TP // tabpage line , HLF_TPS // tabpage line selected , HLF_TPF // tabpage line filler - , HLF_CUC // 'cursurcolumn' - , HLF_CUL // 'cursurline' + , HLF_CUC // 'cursorcolumn' + , HLF_CUL // 'cursorline' , HLF_MC // 'colorcolumn' , HLF_QFL // selected quickfix line , HLF_0 // Whitespace diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 1de5e5cc3d..2a1dae1767 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -2826,7 +2826,7 @@ win_line ( draw_state = WL_BRI - 1; } - // draw 'breakindent': indent wrapped text accodringly + // draw 'breakindent': indent wrapped text accordingly if (draw_state == WL_BRI - 1 && n_extra == 0) { draw_state = WL_BRI; // if need_showbreak is set, breakindent also applies @@ -3052,7 +3052,8 @@ win_line ( diff_hlf = HLF_CHD; // changed line } line_attr = win_hl_attr(wp, diff_hlf); - if (wp->w_p_cul && lnum == wp->w_cursor.lnum) { + // Overlay CursorLine onto diff highlight, unless it's low-priority. + if (!line_attr_lowprio && wp->w_p_cul && lnum == wp->w_cursor.lnum) { line_attr = hl_combine_attr(line_attr, win_hl_attr(wp, HLF_CUL)); } } diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index 22eabc75c1..2cade9f281 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -61,6 +61,7 @@ struct hl_group { scid_T sg_scriptID; ///< script in which the group was last set // for terminal UIs int sg_cterm; ///< "cterm=" highlighting attr + ///< (combination of \ref HlAttrFlags) int sg_cterm_fg; ///< terminal fg color number + 1 int sg_cterm_bg; ///< terminal bg color number + 1 bool sg_cterm_bold; ///< bold attr was set for light color |