# HG changeset patch # User Bram Moolenaar # Date 1682879406 -7200 # Node ID d98bc69929454477e0869904783127de645100a7 # Parent 534fb2dcf7a9433227284aeb09d5181f3f3736dd 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 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) 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 --- /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| 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 --- /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| diff --git a/src/testdir/test_display.vim b/src/testdir/test_display.vim --- 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 diff --git a/src/version.c b/src/version.c --- 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,