diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-07-26 10:01:12 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-26 02:01:12 +0000 |
commit | 0dfcf3fe12ace3116bdffbbfc6875c67023eb8f2 (patch) | |
tree | 9e7098f0f7ff8c1b4feac3c093f858ca4f343c46 /src/nvim/plines.c | |
parent | 5af9c065ada5600a076e24ca899da38b299c81e6 (diff) | |
download | rneovim-0dfcf3fe12ace3116bdffbbfc6875c67023eb8f2.tar.gz rneovim-0dfcf3fe12ace3116bdffbbfc6875c67023eb8f2.tar.bz2 rneovim-0dfcf3fe12ace3116bdffbbfc6875c67023eb8f2.zip |
fix(plines): don't count invalidated virt text in char size (#29863)
Also:
- Remove mt_end() and MT_FLAG_DECOR_VIRT_TEXT_INLINE checks, as they are
already checked by marktree_itr_check_filter().
- Move ns_in_win() to the last check in decor_redraw_col().
Diffstat (limited to 'src/nvim/plines.c')
-rw-r--r-- | src/nvim/plines.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nvim/plines.c b/src/nvim/plines.c index f74beff954..c546099f58 100644 --- a/src/nvim/plines.c +++ b/src/nvim/plines.c @@ -158,8 +158,7 @@ CharSize charsize_regular(CharsizeArg *csarg, char *const cur, colnr_T const vco if (mark.pos.row != csarg->virt_row || mark.pos.col > col) { break; } else if (mark.pos.col == col) { - if (!mt_end(mark) && (mark.flags & MT_FLAG_DECOR_VIRT_TEXT_INLINE) - && ns_in_win(mark.ns, wp)) { + if (!mt_invalid(mark) && ns_in_win(mark.ns, wp)) { DecorInline decor = mt_decor(mark); DecorVirtText *vt = decor.ext ? decor.data.ext.vt : NULL; while (vt) { |