Mercurial > vim
diff src/structs.h @ 29451:057c26b5c33a v9.0.0067
patch 9.0.0067: cannot show virtual text
Commit: https://github.com/vim/vim/commit/7f9969c559b51446632ac7e8f76cde07e7d0078d
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jul 25 18:13:54 2022 +0100
patch 9.0.0067: cannot show virtual text
Problem: Cannot show virtual text.
Solution: Initial changes for virtual text support, using text properties.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 25 Jul 2022 19:15:06 +0200 |
parents | 9dce192d1ac2 |
children | 1ae3e2d691a0 |
line wrap: on
line diff
--- a/src/structs.h +++ b/src/structs.h @@ -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;