diff options
Diffstat (limited to 'src/nvim/decoration.h')
-rw-r--r-- | src/nvim/decoration.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/nvim/decoration.h b/src/nvim/decoration.h index e44fbab0a5..97ae9ed5d8 100644 --- a/src/nvim/decoration.h +++ b/src/nvim/decoration.h @@ -24,22 +24,34 @@ typedef enum { kHlModeBlend, } HlMode; +typedef kvec_t(VirtTextChunk) VirtText; +#define VIRTTEXT_EMPTY ((VirtText)KV_INITIAL_VALUE) + + +typedef kvec_t(struct virt_line { VirtText line; bool left_col; }) VirtLines; + + struct Decoration { VirtText virt_text; + VirtLines virt_lines; + int hl_id; // highlight group VirtTextPos virt_text_pos; HlMode hl_mode; + + // TODO(bfredl): at some point turn this into FLAGS bool virt_text_hide; bool hl_eol; bool shared; // shared decoration, don't free + bool virt_lines_above; // TODO(bfredl): style, signs, etc DecorPriority priority; int col; // fixed col value, like win_col int virt_text_width; // width of virt_text }; -#define DECORATION_INIT { KV_INITIAL_VALUE, 0, kVTEndOfLine, kHlModeUnknown, \ - false, false, false, DECOR_PRIORITY_BASE, 0, 0 } +#define DECORATION_INIT { KV_INITIAL_VALUE, KV_INITIAL_VALUE, 0, kVTEndOfLine, kHlModeUnknown, \ + false, false, false, false, DECOR_PRIORITY_BASE, 0, 0 } typedef struct { int start_row; @@ -60,9 +72,7 @@ typedef struct { int row; int col_until; int current; - int eol_col; - VirtText *virt_text; } DecorState; typedef struct { |