mirror of
https://github.com/neovim/neovim.git
synced 2025-10-16 06:46:07 +00:00
refactor(highlight): reshape the HL_UNDER* bits into a 3-bit integer mask
Saves two bits for reuse for new features
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user