From c70aa84b2a79e8ac83a930dd5bf473940274cf1c Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 28 Aug 2023 05:51:19 +0800 Subject: vim-patch:9.0.1800: Cursor position still wrong with 'showbreak' and virtual text Problem: Cursor position still wrong with 'showbreak' and virtual text after last character or 'listchars' "eol". Solution: Remove unnecessary w_wcol adjustment in curs_columns(). Also fix first char of virtual text not shown at the start of a screen line. closes: vim/vim#12478 closes: vim/vim#12532 closes: vim/vim#12904 https://github.com/vim/vim/commit/6a3897232aecd3e8b9e8b23955e55c1993e5baec --- src/nvim/drawline.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/nvim/drawline.c b/src/nvim/drawline.c index 31ca9b16ce..7e92128b65 100644 --- a/src/nvim/drawline.c +++ b/src/nvim/drawline.c @@ -868,8 +868,8 @@ static void apply_cursorline_highlight(win_T *wp, winlinevars_T *wlv) } } -// Checks if there is more inline virtual text that need to be drawn -// and sets has_more_virt_inline_chunks to reflect that. +/// Checks if there is more inline virtual text that need to be drawn +/// and sets has_more_virt_inline_chunks to reflect that. static bool has_more_inline_virt(winlinevars_T *wlv, ptrdiff_t v) { DecorState *state = &decor_state; @@ -3096,8 +3096,8 @@ int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool number_onl || wlv.filler_todo > 0 || (wp->w_p_list && wp->w_p_lcs_chars.eol != NUL && wlv.p_extra != at_end_str) - || (wlv.n_extra != 0 - && (wlv.c_extra != NUL || *wlv.p_extra != NUL)) || wlv.more_virt_inline_chunks)) { + || (wlv.n_extra != 0 && (wlv.c_extra != NUL || *wlv.p_extra != NUL)) + || wlv.more_virt_inline_chunks)) { bool wrap = wp->w_p_wrap // Wrapping enabled. && wlv.filler_todo <= 0 // Not drawing diff filler lines. && lcs_eol_one != -1 // Haven't printed the lcs_eol character. -- cgit