summaryrefslogtreecommitdiffstats
path: root/src/testdir
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/dumps/Test_smoothscroll_1.dump12
-rw-r--r--src/testdir/dumps/Test_smoothscroll_2.dump12
-rw-r--r--src/testdir/dumps/Test_smoothscroll_3.dump12
-rw-r--r--src/testdir/dumps/Test_smoothscroll_4.dump12
-rw-r--r--src/testdir/dumps/Test_smoothscroll_5.dump12
-rw-r--r--src/testdir/dumps/Test_smoothscroll_6.dump12
-rw-r--r--src/testdir/dumps/Test_smoothscroll_7.dump12
-rw-r--r--src/testdir/dumps/Test_smoothscroll_8.dump12
-rw-r--r--src/testdir/test_scroll_opt.vim48
9 files changed, 143 insertions, 1 deletions
diff --git a/src/testdir/dumps/Test_smoothscroll_1.dump b/src/testdir/dumps/Test_smoothscroll_1.dump
new file mode 100644
index 0000000000..7a8c020621
--- /dev/null
+++ b/src/testdir/dumps/Test_smoothscroll_1.dump
@@ -0,0 +1,12 @@
+|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|
+|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| |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
+>l|i|n|e| @35
+|l|i|n|e| @35
+|l|i|n|e| @35
+|~+0#4040ff13&| @38
+|~| @38
+| +0#0000000&@21|5|,|1| @10|B|o|t|
diff --git a/src/testdir/dumps/Test_smoothscroll_2.dump b/src/testdir/dumps/Test_smoothscroll_2.dump
new file mode 100644
index 0000000000..1ab08a9a80
--- /dev/null
+++ b/src/testdir/dumps/Test_smoothscroll_2.dump
@@ -0,0 +1,12 @@
+|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|
+|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|
+|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
+>l|i|n|e| @35
+|l|i|n|e| @35
+|l|i|n|e| @35
+|~+0#4040ff13&| @38
+|~| @38
+|~| @38
+| +0#0000000&@21|5|,|1| @10|B|o|t|
diff --git a/src/testdir/dumps/Test_smoothscroll_3.dump b/src/testdir/dumps/Test_smoothscroll_3.dump
new file mode 100644
index 0000000000..184909360f
--- /dev/null
+++ b/src/testdir/dumps/Test_smoothscroll_3.dump
@@ -0,0 +1,12 @@
+|w+0&#ffffff0|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|
+|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
+>l|i|n|e| @35
+|l|i|n|e| @35
+|l|i|n|e| @35
+|~+0#4040ff13&| @38
+|~| @38
+|~| @38
+|~| @38
+| +0#0000000&@21|5|,|1| @10|B|o|t|
diff --git a/src/testdir/dumps/Test_smoothscroll_4.dump b/src/testdir/dumps/Test_smoothscroll_4.dump
new file mode 100644
index 0000000000..63539c9c0d
--- /dev/null
+++ b/src/testdir/dumps/Test_smoothscroll_4.dump
@@ -0,0 +1,12 @@
+|l+0&#ffffff0|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
+|l|i|n|e| @35
+|l|i|n|e| @35
+>l|i|n|e| @35
+|~+0#4040ff13&| @38
+|~| @38
+|~| @38
+|~| @38
+|~| @38
+| +0#0000000&@21|7|,|1| @10|B|o|t|
diff --git a/src/testdir/dumps/Test_smoothscroll_5.dump b/src/testdir/dumps/Test_smoothscroll_5.dump
new file mode 100644
index 0000000000..40478bb1de
--- /dev/null
+++ b/src/testdir/dumps/Test_smoothscroll_5.dump
@@ -0,0 +1,12 @@
+|w+0&#ffffff0|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|
+|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
+|l|i|n|e| @35
+|l|i|n|e| @35
+>l|i|n|e| @35
+|~+0#4040ff13&| @38
+|~| @38
+|~| @38
+|~| @38
+| +0#0000000&@21|7|,|1| @10|B|o|t|
diff --git a/src/testdir/dumps/Test_smoothscroll_6.dump b/src/testdir/dumps/Test_smoothscroll_6.dump
new file mode 100644
index 0000000000..4ca7b35a9e
--- /dev/null
+++ b/src/testdir/dumps/Test_smoothscroll_6.dump
@@ -0,0 +1,12 @@
+|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|
+|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|
+|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
+|l|i|n|e| @35
+|l|i|n|e| @35
+>l|i|n|e| @35
+|~+0#4040ff13&| @38
+|~| @38
+|~| @38
+| +0#0000000&@21|7|,|1| @10|B|o|t|
diff --git a/src/testdir/dumps/Test_smoothscroll_7.dump b/src/testdir/dumps/Test_smoothscroll_7.dump
new file mode 100644
index 0000000000..0579f6f7f6
--- /dev/null
+++ b/src/testdir/dumps/Test_smoothscroll_7.dump
@@ -0,0 +1,12 @@
+|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|
+|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| |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
+|l|i|n|e| @35
+|l|i|n|e| @35
+>l|i|n|e| @35
+|~+0#4040ff13&| @38
+|~| @38
+| +0#0000000&@21|7|,|1| @10|B|o|t|
diff --git a/src/testdir/dumps/Test_smoothscroll_8.dump b/src/testdir/dumps/Test_smoothscroll_8.dump
new file mode 100644
index 0000000000..b7a5bce63e
--- /dev/null
+++ b/src/testdir/dumps/Test_smoothscroll_8.dump
@@ -0,0 +1,12 @@
+|l+0&#ffffff0|i|n|e| |o|n|e| @31
+|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| |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|
+|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
+|l|i|n|e| @35
+|l|i|n|e| @35
+>l|i|n|e| @35
+|~+0#4040ff13&| @38
+| +0#0000000&@21|7|,|1| @10|A|l@1|
diff --git a/src/testdir/test_scroll_opt.vim b/src/testdir/test_scroll_opt.vim
index bf281239f2..f034d3a230 100644
--- a/src/testdir/test_scroll_opt.vim
+++ b/src/testdir/test_scroll_opt.vim
@@ -1,4 +1,7 @@
-" Test for reset 'scroll'
+" Test for reset 'scroll' and 'smoothscroll'
+
+source check.vim
+source screendump.vim
func Test_reset_scroll()
let scr = &l:scroll
@@ -34,4 +37,47 @@ func Test_reset_scroll()
quit!
endfunc
+func Test_smoothscroll_CtrlE_CtrlY()
+ CheckScreendump
+
+ let lines =<< trim END
+ vim9script
+ setline(1, [
+ 'line one',
+ 'word '->repeat(20),
+ 'line three',
+ 'long word '->repeat(7),
+ 'line',
+ 'line',
+ 'line',
+ ])
+ set smoothscroll
+ :5
+ END
+ call writefile(lines, 'XSmoothScroll', 'D')
+ let buf = RunVimInTerminal('-S XSmoothScroll', #{rows: 12, cols: 40})
+
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_smoothscroll_1', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_smoothscroll_2', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_smoothscroll_3', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_smoothscroll_4', {})
+
+ call term_sendkeys(buf, "\<C-Y>")
+ call VerifyScreenDump(buf, 'Test_smoothscroll_5', {})
+ call term_sendkeys(buf, "\<C-Y>")
+ call VerifyScreenDump(buf, 'Test_smoothscroll_6', {})
+ call term_sendkeys(buf, "\<C-Y>")
+ call VerifyScreenDump(buf, 'Test_smoothscroll_7', {})
+ call term_sendkeys(buf, "\<C-Y>")
+ call VerifyScreenDump(buf, 'Test_smoothscroll_8', {})
+
+ call StopVimInTerminal(buf)
+endfunc
+
+
+
" vim: shiftwidth=2 sts=2 expandtab