aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-08-12 06:32:13 +0800
committerGitHub <noreply@github.com>2023-08-12 06:32:13 +0800
commit8f9c5ee5ef298883e6de1a3a9c73b348b6398404 (patch)
treefab638418dada857395c81e24b4dff4413b0f30b /src
parent713311be62db5c5453bcd0a7f1dbed8d1d1add15 (diff)
downloadrneovim-8f9c5ee5ef298883e6de1a3a9c73b348b6398404.tar.gz
rneovim-8f9c5ee5ef298883e6de1a3a9c73b348b6398404.tar.bz2
rneovim-8f9c5ee5ef298883e6de1a3a9c73b348b6398404.zip
vim-patch:9.0.1691: wrong viewport restored for incsearch and smoothscroll (#24667)
Problem: wrong viewport restored for incsearch and smoothscroll Solution: Save and restore skipcol as well closes: vim/vim#12713 https://github.com/vim/vim/commit/7b7b4cb6f274e7bace127107b0d2752133c4020b
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ex_getln.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index 87e45cbb66..17c17e60ce 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -82,6 +82,7 @@ static unsigned last_prompt_id = 0;
typedef struct {
colnr_T vs_curswant;
colnr_T vs_leftcol;
+ colnr_T vs_skipcol;
linenr_T vs_topline;
int vs_topfill;
linenr_T vs_botline;
@@ -208,6 +209,7 @@ static void save_viewstate(win_T *wp, viewstate_T *vs)
{
vs->vs_curswant = wp->w_curswant;
vs->vs_leftcol = wp->w_leftcol;
+ vs->vs_skipcol = wp->w_skipcol;
vs->vs_topline = wp->w_topline;
vs->vs_topfill = wp->w_topfill;
vs->vs_botline = wp->w_botline;
@@ -219,6 +221,7 @@ static void restore_viewstate(win_T *wp, viewstate_T *vs)
{
wp->w_curswant = vs->vs_curswant;
wp->w_leftcol = vs->vs_leftcol;
+ wp->w_skipcol = vs->vs_skipcol;
wp->w_topline = vs->vs_topline;
wp->w_topfill = vs->vs_topfill;
wp->w_botline = vs->vs_botline;