0
0
mirror of https://github.com/vim/vim.git synced 2025-10-27 09:24:23 -04:00

patch 9.0.1691: wrong viewport restored for incsearch and smoothscroll

Problem: wrong viewport restored for incsearch and smoothscroll
Solution: Save and restore skipcol as well

closes: #12713

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
This commit is contained in:
zeertzjq
2023-08-11 23:48:27 +02:00
committed by Christian Brabandt
parent f6cdab3704
commit 7b7b4cb6f2
5 changed files with 39 additions and 0 deletions

View File

@@ -122,6 +122,7 @@ empty_pattern_magic(char_u *p, size_t len, magic_T magic_val)
typedef struct {
colnr_T vs_curswant;
colnr_T vs_leftcol;
colnr_T vs_skipcol;
linenr_T vs_topline;
# ifdef FEAT_DIFF
int vs_topfill;
@@ -135,6 +136,7 @@ save_viewstate(viewstate_T *vs)
{
vs->vs_curswant = curwin->w_curswant;
vs->vs_leftcol = curwin->w_leftcol;
vs->vs_skipcol = curwin->w_skipcol;
vs->vs_topline = curwin->w_topline;
# ifdef FEAT_DIFF
vs->vs_topfill = curwin->w_topfill;
@@ -148,6 +150,7 @@ restore_viewstate(viewstate_T *vs)
{
curwin->w_curswant = vs->vs_curswant;
curwin->w_leftcol = vs->vs_leftcol;
curwin->w_skipcol = vs->vs_skipcol;
curwin->w_topline = vs->vs_topline;
# ifdef FEAT_DIFF
curwin->w_topfill = vs->vs_topfill;