summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2023-05-18 13:26:57 +0100
committerBram Moolenaar <Bram@vim.org>2023-05-18 13:26:57 +0100
commit0222c2d103ad9298bec4dc8864cd80b4e7559db1 (patch)
treeb7d74d46b26c2364cc57e284ad6b881f6aec2b8e
parentc0da540466c89e388e7a15a12bab2f9fc42d9671 (diff)
patch 9.0.1564: display moves up and down with 'incsearch' and 'smoothscroll'v9.0.1564
Problem: Display moves up and down with 'incsearch' and 'smoothscroll'. Solution: Do not check if w_skipcol changed. (Luuk van Baal, closes #12410, closes #12409)
-rw-r--r--src/move.c5
-rw-r--r--src/testdir/dumps/Test_smooth_wrap_2.dump6
-rw-r--r--src/testdir/dumps/Test_smooth_wrap_4.dump4
-rw-r--r--src/version.c2
4 files changed, 9 insertions, 8 deletions
diff --git a/src/move.c b/src/move.c
index 93c101b794..3f6802ac7f 100644
--- a/src/move.c
+++ b/src/move.c
@@ -312,7 +312,6 @@ update_topline(void)
*so_ptr = mouse_dragging - 1;
linenr_T old_topline = curwin->w_topline;
- colnr_T old_skipcol = curwin->w_skipcol;
#ifdef FEAT_DIFF
int old_topfill = curwin->w_topfill;
#endif
@@ -517,8 +516,8 @@ update_topline(void)
dollar_vcol = -1;
redraw_later(UPD_VALID);
- // Only reset w_skipcol if it was not just set to make cursor visible.
- if (curwin->w_skipcol == old_skipcol)
+ // When 'smoothscroll' is not set, should reset w_skipcol.
+ if (!curwin->w_p_sms)
reset_skipcol();
// May need to set w_skipcol when cursor in w_topline.
diff --git a/src/testdir/dumps/Test_smooth_wrap_2.dump b/src/testdir/dumps/Test_smooth_wrap_2.dump
index 65a357dbb1..fb0a981a8d 100644
--- a/src/testdir/dumps/Test_smooth_wrap_2.dump
+++ b/src/testdir/dumps/Test_smooth_wrap_2.dump
@@ -1,8 +1,8 @@
-|<+0#4040ff13#ffffff0@2|h+0#0000000&| |s|o|m|e| |t|e|x|t| |w|i|t|h| |s|o|m|e| |t|e|x|t| @10
-|L|i|n|e| |w|i|t|h| |s|o|m|e| |t|e|x|t| |w|i|t|h| |s|o|m|e| |t|e|x|t| |w|i|t|h|
+|L+0&#ffffff0|i|n|e| |w|i|t|h| |s|o|m|e| |t|e|x|t| |w|i|t|h| |s|o|m|e| |t|e|x|t| |w|i|t|h|
|s|o|m|e| |t|e|x|t| |w|i|t|h| |s|o|m|e| |t|e|x|t| |w|i|t|h| |s|o|m|e| |t|e|x|t|
|w|i|t|h| |s|o|m|e| |t|e|x|t| |w|i|t|h| |s|o|m|e| |t|e|x|t| @10
>L|i|n|e| |w|i|t|h| |s|o|m|e| |t|e|x|t| |w|i|t|h| |s|o|m|e| |t|e|x|t| |w|i|t|h|
|s|o|m|e| |t|e|x|t| |w|i|t|h| |s|o|m|e| |t|e|x|t| |w|i|t|h| |s|o|m|e| |t|e|x|t|
|w|i|t|h| |s|o|m|e| |t|e|x|t| |w|i|t|h| |s|o|m|e| |t|e|x|t| @10
-@22|4|,|1| @10|2|5|%|
+|@+0#4040ff13&@2| @36
+| +0#0000000&@21|4|,|1| @10|4|0|%|
diff --git a/src/testdir/dumps/Test_smooth_wrap_4.dump b/src/testdir/dumps/Test_smooth_wrap_4.dump
index c23f494dcd..1c42f64f48 100644
--- a/src/testdir/dumps/Test_smooth_wrap_4.dump
+++ b/src/testdir/dumps/Test_smooth_wrap_4.dump
@@ -2,7 +2,7 @@
|L|i|n|e| |w|i|t|h| |s|o|m|e| |t|e|x|t| |w|i|t|h| |s|o|m|e| |t|e|x|t| |w|i|t|h|
|s|o|m|e| |t|e|x|t| |w|i|t|h| |s|o|m|e| |t|e|x|t| |w|i|t|h| |s|o|m|e| |t|e|x|t|
|w|i|t|h| |s|o|m|e| |t|e|x|t| |w|i|t|h| |s|o|m|e| |t|e|x|t| @10
->L|i|n|e| |w|i|t|h| |s|o|m|e| |t|e|x|t| |w|i|t|h| |s|o|m|e| |t|e|x|t| |w|i|t|h|
+|L|i|n|e| |w|i|t|h| |s|o|m|e| |t|e|x|t| |w|i|t|h| |s|o|m|e| |t|e|x|t| |w|i|t|h|
|s|o|m|e| |t|e|x|t| |w|i|t|h| |s|o|m|e| |t|e|x|t| |w|i|t|h| |s|o|m|e| |t|e|x|t|
-|w|i|t|h| |s|o|m|e| |t|e|x|t| |w|i|t|h| |s|o|m|e| |t|e|x|t| @10
+>w|i|t|h| |s|o|m|e| |t|e|x|t| |w|i|t|h| |s|o|m|e| |t|e|x|t| @10
@22|7|,|1| @10|B|o|t|
diff --git a/src/version.c b/src/version.c
index 0e1e326168..6cf7de948e 100644
--- a/src/version.c
+++ b/src/version.c
@@ -696,6 +696,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1564,
+/**/
1563,
/**/
1562,