]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.1502: no test for deleting the end of a long wrapped line v9.0.1502
authorLuuk van Baal <luukvbaal@gmail.com>
Sun, 30 Apr 2023 18:15:30 +0000 (19:15 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 30 Apr 2023 18:15:30 +0000 (19:15 +0100)
Problem:    No test for deleting the end of a long wrapped line.
Solution:   Add a test to check the right text is displayed. (Luuk van Baal,
            closes #12318)

src/testdir/dumps/Test_display_long_line_1.dump [new file with mode: 0644]
src/testdir/dumps/Test_display_long_line_2.dump [new file with mode: 0644]
src/testdir/test_display.vim
src/version.c

diff --git a/src/testdir/dumps/Test_display_long_line_1.dump b/src/testdir/dumps/Test_display_long_line_1.dump
new file mode 100644 (file)
index 0000000..691f358
--- /dev/null
@@ -0,0 +1,14 @@
+|<+0#4040ff13#ffffff0@2|a+0#0000000&@31
+@35
+@35
+@35
+@35
+@35
+@35
+@35
+@35
+@35
+@35
+@26>a@8
+@10| @24
+@18|1|,|4|8|2| @7|T|o|p| 
diff --git a/src/testdir/dumps/Test_display_long_line_2.dump b/src/testdir/dumps/Test_display_long_line_2.dump
new file mode 100644 (file)
index 0000000..dcf6e27
--- /dev/null
@@ -0,0 +1,14 @@
+|<+0#4040ff13#ffffff0@2|a+0#0000000&@31
+@35
+@35
+@35
+@35
+@35
+@35
+@35
+@35
+@35
+@35
+@25>a| @8
+|b@4| |b@4| |b@4| |b@4| |b@4| |b@1|@+0#4040ff13&@2
+| +0#0000000&@17|1|,|4|8|1| @7|T|o|p| 
index abf1cd0cd0b20868be7f6c53420dc58fcfe80e9b..6acf4e3f58d0e841a3d8928d62f7a7c2a05732c1 100644 (file)
@@ -467,5 +467,26 @@ func Test_display_lastline()
   call assert_fails(':set fillchars=lastline:〇', 'E474:')
 endfunc
 
+func Test_display_long_lastline()
+  CheckScreendump
+
+  let lines =<< trim END
+    set display=lastline
+    call setline(1, [
+      \'aaaaa'->repeat(100),
+      \'bbbbb '->repeat(7) .. 'ccccc '->repeat(7) .. 'ddddd '->repeat(7)
+    \])
+  END
+
+  call writefile(lines, 'XdispLongline', 'D')
+  let buf = RunVimInTerminal('-S XdispLongline', #{rows: 14, cols: 35})
+
+  call term_sendkeys(buf, "482|")
+  call VerifyScreenDump(buf, 'Test_display_long_line_1', {})
+  call term_sendkeys(buf, "D")
+  call VerifyScreenDump(buf, 'Test_display_long_line_2', {})
+
+  call StopVimInTerminal(buf)
+endfunc
 
 " vim: shiftwidth=2 sts=2 expandtab
index 5934272e9d4c777f512cd9d7af4613151e474d0f..47b38cd29597721e295b2ad420f445f828625d9e 100644 (file)
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1502,
 /**/
     1501,
 /**/