From 1af4bd04f9ad157edbfea30642250e854c5cb5d2 Mon Sep 17 00:00:00 2001 From: Raphael Date: Sun, 6 Nov 2022 18:59:43 +0800 Subject: feat(ui): add support to display a title in the border of a float (#20184) add "title" and "title_pos" keys to win config dict. --- src/nvim/highlight_defs.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/nvim/highlight_defs.h') diff --git a/src/nvim/highlight_defs.h b/src/nvim/highlight_defs.h index ffcb0f3f22..d66bcca57f 100644 --- a/src/nvim/highlight_defs.h +++ b/src/nvim/highlight_defs.h @@ -114,6 +114,7 @@ typedef enum { HLF_WBR, // Window bars HLF_WBRNC, // Window bars of not-current windows HLF_CU, // Cursor + HLF_BTITLE, // Float Border Title HLF_COUNT, // MUST be the last one } hlf_T; @@ -178,6 +179,7 @@ EXTERN const char *hlf_names[] INIT(= { [HLF_WBR] = "WinBar", [HLF_WBRNC] = "WinBarNC", [HLF_CU] = "Cursor", + [HLF_BTITLE] = "FloatBorderTitle", }); EXTERN int highlight_attr[HLF_COUNT + 1]; // Highl. attr for each context. -- cgit From 3435cdfb94b6f3c72e7f0f16fef9ff2660377cb2 Mon Sep 17 00:00:00 2001 From: Raphael Date: Mon, 7 Nov 2022 20:02:00 +0800 Subject: refactor(highlight): rename FloatBorderTitle #20988 requested in https://github.com/neovim/neovim/pull/20184 --- src/nvim/highlight_defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/highlight_defs.h') diff --git a/src/nvim/highlight_defs.h b/src/nvim/highlight_defs.h index d66bcca57f..2557a248c3 100644 --- a/src/nvim/highlight_defs.h +++ b/src/nvim/highlight_defs.h @@ -179,7 +179,7 @@ EXTERN const char *hlf_names[] INIT(= { [HLF_WBR] = "WinBar", [HLF_WBRNC] = "WinBarNC", [HLF_CU] = "Cursor", - [HLF_BTITLE] = "FloatBorderTitle", + [HLF_BTITLE] = "FloatTitle", }); EXTERN int highlight_attr[HLF_COUNT + 1]; // Highl. attr for each context. -- cgit From f5d357de553c1aa61cdb25b047f984f6414b1967 Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Thu, 19 Jan 2023 17:51:56 +0000 Subject: refactor(highlight): reshape the HL_UNDER* bits into a 3-bit integer mask Saves two bits for reuse for new features --- src/nvim/highlight_defs.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'src/nvim/highlight_defs.h') diff --git a/src/nvim/highlight_defs.h b/src/nvim/highlight_defs.h index 2557a248c3..1e109a0316 100644 --- a/src/nvim/highlight_defs.h +++ b/src/nvim/highlight_defs.h @@ -15,19 +15,22 @@ typedef enum { HL_INVERSE = 0x01, HL_BOLD = 0x02, HL_ITALIC = 0x04, + // The next three bits are all underline styles + HL_UNDERLINE_MASK = 0x38, HL_UNDERLINE = 0x08, - HL_UNDERCURL = 0x10, - HL_UNDERDOUBLE = 0x20, - HL_UNDERDOTTED = 0x40, - HL_UNDERDASHED = 0x80, - HL_STANDOUT = 0x0100, - HL_NOCOMBINE = 0x0200, - HL_STRIKETHROUGH = 0x0400, + HL_UNDERDOUBLE = 0x10, + HL_UNDERCURL = 0x18, + HL_UNDERDOTTED = 0x20, + HL_UNDERDASHED = 0x28, + // 0x30 and 0x38 spare for underline styles + HL_STANDOUT = 0x0040, + HL_STRIKETHROUGH = 0x0080, + // 0x0100-0x0200 spare + HL_NOCOMBINE = 0x0400, HL_BG_INDEXED = 0x0800, HL_FG_INDEXED = 0x1000, HL_DEFAULT = 0x2000, HL_GLOBAL = 0x4000, - HL_ANY_UNDERLINE = HL_UNDERLINE | HL_UNDERDOUBLE | HL_UNDERCURL | HL_UNDERDOTTED | HL_UNDERDASHED, } HlAttrFlags; /// Stores a complete highlighting entry, including colors and attributes -- cgit From f3039ce531f49a63f8fd07317c1f957fb28fc6a7 Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Thu, 19 Jan 2023 23:18:21 +0000 Subject: feat(highlight): define the concept of altfont as a (c)term rendering attribute --- src/nvim/highlight_defs.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/nvim/highlight_defs.h') diff --git a/src/nvim/highlight_defs.h b/src/nvim/highlight_defs.h index 1e109a0316..a4dcf6eb60 100644 --- a/src/nvim/highlight_defs.h +++ b/src/nvim/highlight_defs.h @@ -22,10 +22,11 @@ typedef enum { HL_UNDERCURL = 0x18, HL_UNDERDOTTED = 0x20, HL_UNDERDASHED = 0x28, - // 0x30 and 0x38 spare for underline styles + // 0x30 and 0x38 spare for underline styles HL_STANDOUT = 0x0040, HL_STRIKETHROUGH = 0x0080, - // 0x0100-0x0200 spare + HL_ALTFONT = 0x0100, + // 0x0200 spare HL_NOCOMBINE = 0x0400, HL_BG_INDEXED = 0x0800, HL_FG_INDEXED = 0x1000, -- cgit