Mercurial > vim
diff src/structs.h @ 29560:14b139cbec49 v9.0.0121
patch 9.0.0121: cannot put virtual text after or below a line
Commit: https://github.com/vim/vim/commit/b7963df98f9dbbb824713acad2f47c9989fcf8f3
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jul 31 17:12:43 2022 +0100
patch 9.0.0121: cannot put virtual text after or below a line
Problem: Cannot put virtual text after or below a line.
Solution: Add "text_align" and "text_wrap" arguments.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 31 Jul 2022 18:15:03 +0200 |
parents | 1ae3e2d691a0 |
children | f2d7f20d83c3 |
line wrap: on
line diff
--- a/src/structs.h +++ b/src/structs.h @@ -808,7 +808,13 @@ typedef struct textprop_S #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 + +// without these text is placed after the end of the line +#define TP_FLAG_ALIGN_RIGHT 0x10 // virtual text is right-aligned +#define TP_FLAG_ALIGN_BELOW 0x20 // virtual text on next screen line + +#define TP_FLAG_WRAP 0x40 // virtual text wraps - when missing + // text is truncated /* * Structure defining a property type. @@ -4575,6 +4581,8 @@ typedef struct { textprop_T *cts_text_props; // text props (allocated) char cts_has_prop_with_text; // TRUE if if a property inserts text int cts_cur_text_width; // width of current inserted text + int cts_with_trailing; // include size of trailing props with + // last character #endif int cts_vcol; // virtual column at current position } chartabsize_T;