changeset 32341:d98bc6992945 v9.0.1502

patch 9.0.1502: no test for deleting the end of a long wrapped line Commit: https://github.com/vim/vim/commit/5b10a140983c16140d69a214494c4b8af8b34763 Author: Luuk van Baal <luukvbaal@gmail.com> Date: Sun Apr 30 19:15:30 2023 +0100 patch 9.0.1502: no test for deleting the end of a long wrapped line 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)
author Bram Moolenaar <Bram@vim.org>
date Sun, 30 Apr 2023 20:30:06 +0200
parents 534fb2dcf7a9
children 26509088f9f8
files src/testdir/dumps/Test_display_long_line_1.dump src/testdir/dumps/Test_display_long_line_2.dump src/testdir/test_display.vim src/version.c
diffstat 4 files changed, 51 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
new file mode 100644
--- /dev/null
+++ b/src/testdir/dumps/Test_display_long_line_1.dump
@@ -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| 
new file mode 100644
--- /dev/null
+++ b/src/testdir/dumps/Test_display_long_line_2.dump
@@ -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| 
--- a/src/testdir/test_display.vim
+++ b/src/testdir/test_display.vim
@@ -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
--- 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 */
 /**/
+    1502,
+/**/
     1501,
 /**/
     1500,