decorations: right_align and win_col

This commit is contained in:
Björn Linse
2021-04-15 20:57:23 +02:00
parent 59eae3b38f
commit 0865f1238f
5 changed files with 227 additions and 60 deletions

View File

@@ -21,6 +21,8 @@ typedef uint16_t DecorPriority;
typedef enum {
kVTEndOfLine,
kVTOverlay,
kVTWinCol,
kVTRightAlign,
} VirtTextPos;
typedef enum {
@@ -41,9 +43,10 @@ struct Decoration
// TODO(bfredl): style, signs, etc
DecorPriority priority;
bool shared; // shared decoration, don't free
int col; // fixed col value, like win_col
};
#define DECORATION_INIT { 0, KV_INITIAL_VALUE, kVTEndOfLine, false, \
kHlModeUnknown, false, DECOR_PRIORITY_BASE, false }
kHlModeUnknown, false, DECOR_PRIORITY_BASE, false, 0 }
typedef struct {
int start_row;
@@ -53,7 +56,7 @@ typedef struct {
Decoration decor;
int attr_id; // cached lookup of decor.hl_id
bool virt_text_owned;
int virt_col;
int win_col;
} DecorRange;
typedef struct {