comparison 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
comparison
equal deleted inserted replaced
29450:67f31c24291b 29451:057c26b5c33a
804 int tp_id; // identifier 804 int tp_id; // identifier
805 int tp_type; // property type 805 int tp_type; // property type
806 int tp_flags; // TP_FLAG_ values 806 int tp_flags; // TP_FLAG_ values
807 } textprop_T; 807 } textprop_T;
808 808
809 #define TP_FLAG_CONT_NEXT 1 // property continues in next line 809 #define TP_FLAG_CONT_NEXT 0x1 // property continues in next line
810 #define TP_FLAG_CONT_PREV 2 // property was continued from prev line 810 #define TP_FLAG_CONT_PREV 0x2 // property was continued from prev line
811 #define TP_VIRTUAL 0x4 // virtual text, uses tp_id
811 812
812 /* 813 /*
813 * Structure defining a property type. 814 * Structure defining a property type.
814 */ 815 */
815 typedef struct proptype_S 816 typedef struct proptype_S
3072 list_T *b_recorded_changes; 3073 list_T *b_recorded_changes;
3073 #endif 3074 #endif
3074 #ifdef FEAT_PROP_POPUP 3075 #ifdef FEAT_PROP_POPUP
3075 int b_has_textprop; // TRUE when text props were added 3076 int b_has_textprop; // TRUE when text props were added
3076 hashtab_T *b_proptypes; // text property types local to buffer 3077 hashtab_T *b_proptypes; // text property types local to buffer
3078 garray_T b_textprop_text; // stores text for props, index by (-id - 1)
3077 #endif 3079 #endif
3078 3080
3079 #if defined(FEAT_BEVAL) && defined(FEAT_EVAL) 3081 #if defined(FEAT_BEVAL) && defined(FEAT_EVAL)
3080 char_u *b_p_bexpr; // 'balloonexpr' local value 3082 char_u *b_p_bexpr; // 'balloonexpr' local value
3081 long_u b_p_bexpr_flags;// flags for 'balloonexpr' 3083 long_u b_p_bexpr_flags;// flags for 'balloonexpr'
4558 typedef struct { 4560 typedef struct {
4559 int idx; 4561 int idx;
4560 char_u *str; 4562 char_u *str;
4561 int score; 4563 int score;
4562 } fuzmatch_str_T; 4564 } fuzmatch_str_T;
4565
4566 // Argument for lbr_chartabsize().
4567 typedef struct {
4568 win_T *cts_win;
4569 linenr_T cts_lnum; // zero when not using text properties
4570 char_u *cts_line; // start of the line
4571 char_u *cts_ptr; // current position in line
4572 #ifdef FEAT_PROP_POPUP
4573 int cts_text_prop_count; // number of text props
4574 textprop_T *cts_text_props; // text props (allocated) or NULL
4575 char cts_has_prop_with_text; // TRUE if if a property inserts text
4576 int cts_cur_text_width; // width of current inserted text
4577 #endif
4578 int cts_vcol; // virtual column at current position
4579 } chartabsize_T;