fix(marks): make jumpoptions=view work with 'smoothscroll' (#38339)

Problem:  'jumpoptions' "view" doesn't remember skipcol and may lead to
          glitched display with 'smoothscroll'.
Solution: Save skipcol in the mark view. Also make sure skipcol doesn't
          exceed line size.
This commit is contained in:
zeertzjq
2026-03-17 21:52:25 +08:00
committed by GitHub
parent a5b8cf145d
commit 5773f0e994
8 changed files with 171 additions and 101 deletions

View File

@@ -3087,7 +3087,7 @@ static bool ins_esc(int *count, int cmdchar, bool nomove)
// Remember the last Insert position in the '^ mark.
if ((cmdmod.cmod_flags & CMOD_KEEPJUMPS) == 0) {
fmarkv_T view = mark_view_make(curwin->w_topline, curwin->w_cursor);
fmarkv_T view = mark_view_make(curwin, curwin->w_cursor);
RESET_FMARK(&curbuf->b_last_insert, curwin->w_cursor, curbuf->b_fnum, view);
}