diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-09-15 14:54:42 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-15 14:54:42 +0800 |
commit | b65cd7ff1a0ab037daffd95d5c537898a32ea038 (patch) | |
tree | 65b913e9eafb67f8f0bae581bc38570b330bcded /src | |
parent | b52bd8a2dea829f23721c15ee9ce51ccf766df43 (diff) | |
download | rneovim-b65cd7ff1a0ab037daffd95d5c537898a32ea038.tar.gz rneovim-b65cd7ff1a0ab037daffd95d5c537898a32ea038.tar.bz2 rneovim-b65cd7ff1a0ab037daffd95d5c537898a32ea038.zip |
fix(extmarks): fix wrong virt_text position after wrapped TAB (#25168)
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/drawline.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/drawline.c b/src/nvim/drawline.c index b22699231d..f9ddeeb94b 100644 --- a/src/nvim/drawline.c +++ b/src/nvim/drawline.c @@ -3085,11 +3085,11 @@ int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool number_onl if (has_decor && (wp->w_p_rl ? (wlv.col < 0) : (wlv.col >= grid->cols))) { // At the end of screen line: might need to peek for decorations just after // this position. - if (wp->w_p_wrap) { + if (!has_fold && wp->w_p_wrap && wlv.n_extra == 0) { // FIXME: virt_text_hide doesn't work for overlay virt_text at the next char // as it's not easy to check if the next char is inside Visual selection. decor_redraw_col(wp, (int)(ptr - line), -3, false, &decor_state); - } else { + } else if (has_fold || !wp->w_p_wrap) { // Without wrapping, we might need to display right_align and win_col // virt_text for the entire text line. decor_redraw_col(wp, MAXCOL, -1, true, &decor_state); |