fix(plines): handle inline virtual text after last char (#24241)

Also remove dead code in win_lbr_chartabsize().
This commit is contained in:
zeertzjq
2023-07-03 22:57:45 +08:00
committed by GitHub
parent 6da110d617
commit 35c3275b48
3 changed files with 47 additions and 14 deletions

View File

@@ -6,19 +6,19 @@
#include "nvim/buffer_defs.h"
#include "nvim/vim.h"
// Argument for lbr_chartabsize().
/// Argument for lbr_chartabsize().
typedef struct {
win_T *cts_win;
char *cts_line; // start of the line
char *cts_ptr; // current position in line
char *cts_line; ///< start of the line
char *cts_ptr; ///< current position in line
int cts_row;
bool cts_has_virt_text; // true if if a property inserts text
int cts_cur_text_width_left; // width of virtual text left of cursor
int cts_cur_text_width_right; // width of virtual text right of cursor
bool cts_has_virt_text; ///< true if if there is inline virtual text
int cts_cur_text_width_left; ///< width of virtual text left of cursor
int cts_cur_text_width_right; ///< width of virtual text right of cursor
MarkTreeIter cts_iter[1];
int cts_vcol; // virtual column at current position
int cts_vcol; ///< virtual column at current position
} chartabsize_T;
#ifdef INCLUDE_GENERATED_DECLARATIONS