From a1d71ad55e0f7149f284178b2d04ac78263b09ff Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 23 Aug 2023 10:12:00 +0800 Subject: vim-patch:9.0.1783: Display issues with virt text smoothscroll and showbreak Problem: Wrong display with wrapping virtual text or unprintable chars, 'showbreak' and 'smoothscroll'. Solution: Don't skip cells taken by 'showbreak' in screen lines before "w_skipcol". Combined "n_skip" and "skip_cells". closes: vim/vim#12597 https://github.com/vim/vim/commit/b557f4898208105b674df605403cac1b1292707b --- src/nvim/edit.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/nvim/edit.c') diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 915399ec78..869b226856 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -232,7 +232,8 @@ static void insert_enter(InsertState *s) may_trigger_modechanged(); stop_insert_mode = false; - // need to position cursor again when on a TAB + // need to position cursor again when on a TAB and + // when on a char with inline virtual text if (gchar_cursor() == TAB || curbuf->b_virt_text_inline > 0) { curwin->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL); } @@ -3471,7 +3472,8 @@ static bool ins_esc(long *count, int cmdchar, bool nomove) State = MODE_NORMAL; may_trigger_modechanged(); - // need to position cursor again when on a TAB + // need to position cursor again when on a TAB and + // when on a char with inline virtual text if (gchar_cursor() == TAB || curbuf->b_virt_text_inline > 0) { curwin->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL); } -- cgit