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

b557f48982
This commit is contained in:
zeertzjq
2023-08-23 10:12:00 +08:00
parent 3e80b39a8e
commit a1d71ad55e
8 changed files with 557 additions and 88 deletions

View File

@@ -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);
}