decorations: allow virt_text overlay at any column

This commit is contained in:
Björn Linse
2021-02-15 14:00:34 +01:00
parent d623400cad
commit 4781333a7a
5 changed files with 238 additions and 69 deletions

View File

@@ -18,10 +18,16 @@ typedef kvec_t(VirtTextChunk) VirtText;
typedef uint16_t DecorPriority;
#define DECOR_PRIORITY_BASE 0x1000
typedef enum {
kVTEndOfLine,
kVTOverlay,
} VirtTextPos;
struct Decoration
{
int hl_id; // highlight group
VirtText virt_text;
VirtTextPos virt_text_pos;
// TODO(bfredl): style, signs, etc
DecorPriority priority;
bool shared; // shared decoration, don't free
@@ -35,7 +41,9 @@ typedef struct {
int attr_id;
DecorPriority priority;
VirtText *virt_text;
VirtTextPos virt_text_pos;
bool virt_text_owned;
int virt_col;
} HlRange;
typedef struct {