diff options
Diffstat (limited to 'src/nvim/decoration.h')
-rw-r--r-- | src/nvim/decoration.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/nvim/decoration.h b/src/nvim/decoration.h index 02472d09e4..7e6dbdf1a7 100644 --- a/src/nvim/decoration.h +++ b/src/nvim/decoration.h @@ -47,13 +47,18 @@ struct Decoration { bool virt_text_hide; bool hl_eol; bool virt_lines_above; - // TODO(bfredl): style, signs, etc + // TODO(bfredl): style, etc DecorPriority priority; int col; // fixed col value, like win_col int virt_text_width; // width of virt_text + char_u *sign_text; + int sign_hl_id; + int number_hl_id; + int line_hl_id; + int cursorline_hl_id; }; #define DECORATION_INIT { KV_INITIAL_VALUE, KV_INITIAL_VALUE, 0, kVTEndOfLine, kHlModeUnknown, \ - false, false, false, DECOR_PRIORITY_BASE, 0, 0 } + false, false, false, DECOR_PRIORITY_BASE, 0, 0, NULL, 0, 0, 0, 0 } typedef struct { int start_row; @@ -75,6 +80,7 @@ typedef struct { int col_until; int current; int eol_col; + bool has_sign_decor; } DecorState; typedef struct { @@ -98,6 +104,15 @@ EXTERN bool provider_active INIT(= false); LUA_NOREF, LUA_NOREF, LUA_NOREF, \ LUA_NOREF, -1 } +static inline bool decor_has_sign(Decoration *decor) +{ + return decor->sign_text + || decor->sign_hl_id + || decor->number_hl_id + || decor->line_hl_id + || decor->cursorline_hl_id; +} + #ifdef INCLUDE_GENERATED_DECLARATIONS # include "decoration.h.generated.h" #endif |