summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/drawline.c41
-rw-r--r--src/testdir/dumps/Test_smoothscroll_2.dump2
-rw-r--r--src/testdir/dumps/Test_smoothscroll_3.dump2
-rw-r--r--src/testdir/dumps/Test_smoothscroll_5.dump2
-rw-r--r--src/testdir/dumps/Test_smoothscroll_6.dump2
-rw-r--r--src/version.c2
6 files changed, 38 insertions, 13 deletions
diff --git a/src/drawline.c b/src/drawline.c
index 79ce5140e..793d8a999 100644
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -740,6 +740,32 @@ text_prop_position(
#endif
/*
+ * Call screen_line() using values from "wlv".
+ * Also takes care of putting "<<<" on the first line for 'smoothscroll'.
+ */
+ static void
+wlv_screen_line(win_T *wp, winlinevars_T *wlv, int negative_width)
+{
+ if (wlv->row == 0 && wp->w_skipcol > 0)
+ {
+ int off = (int)(current_ScreenLine - ScreenLines);
+
+ for (int i = 0; i < 3; ++i)
+ {
+ ScreenLines[off] = '<';
+ if (enc_utf8)
+ ScreenLinesUC[off] = 0;
+ ScreenAttrs[off] = HL_ATTR(HLF_AT);
+ ++off;
+ }
+ }
+
+ screen_line(wp, wlv->screen_row, wp->w_wincol, wlv->col,
+ negative_width ? -wp->w_width : wp->w_width,
+ wlv->screen_line_flags);
+}
+
+/*
* Called when finished with the line: draw the screen line and handle any
* highlighting until the right of the window.
*/
@@ -820,8 +846,7 @@ draw_screen_line(win_T *wp, winlinevars_T *wlv)
}
#endif
- screen_line(wp, wlv->screen_row, wp->w_wincol, wlv->col,
- wp->w_width, wlv->screen_line_flags);
+ wlv_screen_line(wp, wlv, FALSE);
++wlv->row;
++wlv->screen_row;
}
@@ -1730,8 +1755,7 @@ win_line(
#endif
)
{
- screen_line(wp, wlv.screen_row, wp->w_wincol, wlv.col, -wp->w_width,
- wlv.screen_line_flags);
+ wlv_screen_line(wp, &wlv, TRUE);
// Pretend we have finished updating the window. Except when
// 'cursorcolumn' is set.
#ifdef FEAT_SYN_HL
@@ -3670,13 +3694,12 @@ win_line(
)
{
#ifdef FEAT_CONCEAL
- screen_line(wp, wlv.screen_row, wp->w_wincol,
- wlv.col - wlv.boguscols,
- wp->w_width, wlv.screen_line_flags);
+ wlv.col += wlv.boguscols;
+ wlv_screen_line(wp, &wlv, FALSE);
+ wlv.col -= wlv.boguscols;
wlv.boguscols = 0;
#else
- screen_line(wp, wlv.screen_row, wp->w_wincol, wlv.col,
- wp->w_width, wlv.screen_line_flags);
+ screen_line(wp, &wlv, FALSE);
#endif
++wlv.row;
++wlv.screen_row;
diff --git a/src/testdir/dumps/Test_smoothscroll_2.dump b/src/testdir/dumps/Test_smoothscroll_2.dump
index 1ab08a9a8..e8ca1a79e 100644
--- a/src/testdir/dumps/Test_smoothscroll_2.dump
+++ b/src/testdir/dumps/Test_smoothscroll_2.dump
@@ -1,4 +1,4 @@
-|w+0&#ffffff0|o|r|d| |w|o|r|d| |w|o|r|d| |w|o|r|d| |w|o|r|d| |w|o|r|d| |w|o|r|d| |w|o|r|d|
+|<+0#4040ff13#ffffff0@2|d+0#0000000&| |w|o|r|d| |w|o|r|d| |w|o|r|d| |w|o|r|d| |w|o|r|d| |w|o|r|d| |w|o|r|d|
|w|o|r|d| |w|o|r|d| |w|o|r|d| |w|o|r|d| @20
|l|i|n|e| |t|h|r|e@1| @29
|l|o|n|g| |w|o|r|d| |l|o|n|g| |w|o|r|d| |l|o|n|g| |w|o|r|d| |l|o|n|g| |w|o|r|d|
diff --git a/src/testdir/dumps/Test_smoothscroll_3.dump b/src/testdir/dumps/Test_smoothscroll_3.dump
index 184909360..5c2ed949a 100644
--- a/src/testdir/dumps/Test_smoothscroll_3.dump
+++ b/src/testdir/dumps/Test_smoothscroll_3.dump
@@ -1,4 +1,4 @@
-|w+0&#ffffff0|o|r|d| |w|o|r|d| |w|o|r|d| |w|o|r|d| @20
+|<+0#4040ff13#ffffff0@2|d+0#0000000&| |w|o|r|d| |w|o|r|d| |w|o|r|d| @20
|l|i|n|e| |t|h|r|e@1| @29
|l|o|n|g| |w|o|r|d| |l|o|n|g| |w|o|r|d| |l|o|n|g| |w|o|r|d| |l|o|n|g| |w|o|r|d|
|l|o|n|g| |w|o|r|d| |l|o|n|g| |w|o|r|d| |l|o|n|g| |w|o|r|d| @10
diff --git a/src/testdir/dumps/Test_smoothscroll_5.dump b/src/testdir/dumps/Test_smoothscroll_5.dump
index 40478bb1d..b88bd3d6d 100644
--- a/src/testdir/dumps/Test_smoothscroll_5.dump
+++ b/src/testdir/dumps/Test_smoothscroll_5.dump
@@ -1,4 +1,4 @@
-|w+0&#ffffff0|o|r|d| |w|o|r|d| |w|o|r|d| |w|o|r|d| @20
+|<+0#4040ff13#ffffff0@2|d+0#0000000&| |w|o|r|d| |w|o|r|d| |w|o|r|d| @20
|l|i|n|e| |t|h|r|e@1| @29
|l|o|n|g| |w|o|r|d| |l|o|n|g| |w|o|r|d| |l|o|n|g| |w|o|r|d| |l|o|n|g| |w|o|r|d|
|l|o|n|g| |w|o|r|d| |l|o|n|g| |w|o|r|d| |l|o|n|g| |w|o|r|d| @10
diff --git a/src/testdir/dumps/Test_smoothscroll_6.dump b/src/testdir/dumps/Test_smoothscroll_6.dump
index 4ca7b35a9..fb733568c 100644
--- a/src/testdir/dumps/Test_smoothscroll_6.dump
+++ b/src/testdir/dumps/Test_smoothscroll_6.dump
@@ -1,4 +1,4 @@
-|w+0&#ffffff0|o|r|d| |w|o|r|d| |w|o|r|d| |w|o|r|d| |w|o|r|d| |w|o|r|d| |w|o|r|d| |w|o|r|d|
+|<+0#4040ff13#ffffff0@2|d+0#0000000&| |w|o|r|d| |w|o|r|d| |w|o|r|d| |w|o|r|d| |w|o|r|d| |w|o|r|d| |w|o|r|d|
|w|o|r|d| |w|o|r|d| |w|o|r|d| |w|o|r|d| @20
|l|i|n|e| |t|h|r|e@1| @29
|l|o|n|g| |w|o|r|d| |l|o|n|g| |w|o|r|d| |l|o|n|g| |w|o|r|d| |l|o|n|g| |w|o|r|d|
diff --git a/src/version.c b/src/version.c
index 7a5d4955e..24ca413c8 100644
--- a/src/version.c
+++ b/src/version.c
@@ -700,6 +700,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 649,
+/**/
648,
/**/
647,