From: Luuk van Baal Date: Sun, 30 Apr 2023 18:15:30 +0000 (+0100) Subject: patch 9.0.1502: no test for deleting the end of a long wrapped line X-Git-Tag: v9.0.1502 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b10a140983c16140d69a214494c4b8af8b34763;p=thirdparty%2Fvim.git 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 index 0000000000..691f358e9b --- /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 index 0000000000..dcf6e275bd --- /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 index abf1cd0cd0..6acf4e3f58 100644 --- 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 index 5934272e9d..47b38cd295 100644 --- a/src/version.c +++ b/src/version.c @@ -695,6 +695,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1502, /**/ 1501, /**/