forked from aniani/vim
patch 9.0.0067: cannot show virtual text
Problem: Cannot show virtual text. Solution: Initial changes for virtual text support, using text properties.
This commit is contained in:
@@ -806,8 +806,9 @@ typedef struct textprop_S
|
||||
int tp_flags; // TP_FLAG_ values
|
||||
} textprop_T;
|
||||
|
||||
#define TP_FLAG_CONT_NEXT 1 // property continues in next line
|
||||
#define TP_FLAG_CONT_PREV 2 // property was continued from prev line
|
||||
#define TP_FLAG_CONT_NEXT 0x1 // property continues in next line
|
||||
#define TP_FLAG_CONT_PREV 0x2 // property was continued from prev line
|
||||
#define TP_VIRTUAL 0x4 // virtual text, uses tp_id
|
||||
|
||||
/*
|
||||
* Structure defining a property type.
|
||||
@@ -3074,6 +3075,7 @@ struct file_buffer
|
||||
#ifdef FEAT_PROP_POPUP
|
||||
int b_has_textprop; // TRUE when text props were added
|
||||
hashtab_T *b_proptypes; // text property types local to buffer
|
||||
garray_T b_textprop_text; // stores text for props, index by (-id - 1)
|
||||
#endif
|
||||
|
||||
#if defined(FEAT_BEVAL) && defined(FEAT_EVAL)
|
||||
@@ -4560,3 +4562,18 @@ typedef struct {
|
||||
char_u *str;
|
||||
int score;
|
||||
} fuzmatch_str_T;
|
||||
|
||||
// Argument for lbr_chartabsize().
|
||||
typedef struct {
|
||||
win_T *cts_win;
|
||||
linenr_T cts_lnum; // zero when not using text properties
|
||||
char_u *cts_line; // start of the line
|
||||
char_u *cts_ptr; // current position in line
|
||||
#ifdef FEAT_PROP_POPUP
|
||||
int cts_text_prop_count; // number of text props
|
||||
textprop_T *cts_text_props; // text props (allocated) or NULL
|
||||
char cts_has_prop_with_text; // TRUE if if a property inserts text
|
||||
int cts_cur_text_width; // width of current inserted text
|
||||
#endif
|
||||
int cts_vcol; // virtual column at current position
|
||||
} chartabsize_T;
|
||||
|
Reference in New Issue
Block a user