summaryrefslogtreecommitdiff
path: root/src/testdir/test_display.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_display.vim')
-rw-r--r--src/testdir/test_display.vim18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/testdir/test_display.vim b/src/testdir/test_display.vim
index 5b08e84e3..1332ab55e 100644
--- a/src/testdir/test_display.vim
+++ b/src/testdir/test_display.vim
@@ -471,9 +471,9 @@ func Test_display_long_lastline()
CheckScreendump
let lines =<< trim END
- set display=lastline
+ set display=lastline smoothscroll scrolloff=0
call setline(1, [
- \'aaaaa'->repeat(100),
+ \'aaaaa'->repeat(150),
\'bbbbb '->repeat(7) .. 'ccccc '->repeat(7) .. 'ddddd '->repeat(7)
\])
END
@@ -481,11 +481,23 @@ func Test_display_long_lastline()
call writefile(lines, 'XdispLongline', 'D')
let buf = RunVimInTerminal('-S XdispLongline', #{rows: 14, cols: 35})
- call term_sendkeys(buf, "482|")
+ call term_sendkeys(buf, "736|")
call VerifyScreenDump(buf, 'Test_display_long_line_1', {})
+
+ " The correct part of the last line is moved into view.
call term_sendkeys(buf, "D")
call VerifyScreenDump(buf, 'Test_display_long_line_2', {})
+ " "w_skipcol" does not change because the topline is still long enough
+ " to maintain the current skipcol.
+ call term_sendkeys(buf, "g04l11gkD")
+ call VerifyScreenDump(buf, 'Test_display_long_line_3', {})
+
+ " "w_skipcol" is reset to bring the entire topline into view because
+ " the line length is now smaller than the current skipcol + marker.
+ call term_sendkeys(buf, "x")
+ call VerifyScreenDump(buf, 'Test_display_long_line_4', {})
+
call StopVimInTerminal(buf)
endfunc