diff options
author | Bram Moolenaar <Bram@vim.org> | 2023-02-12 18:11:21 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-02-12 18:11:21 +0000 |
commit | 5ceb8157bc4608eeff4b7453da31ebe65f08a862 (patch) | |
tree | 040f8b85a5d5497fe542492748dcc3fc69192a3c | |
parent | 55a27d8ea7c112429fff14aba5db562de7f765f1 (diff) | |
download | vim-git-5ceb8157bc4608eeff4b7453da31ebe65f08a862.tar.gz |
patch 9.0.1306: no regression test for solved problem of #11959v9.0.1306
Problem: No regression test for solved problem of #11959.
Solution: Add a test, also with 'list' set. (closes #11959)
-rw-r--r-- | src/testdir/dumps/Test_prop_above_empty_2.dump | 16 | ||||
-rw-r--r-- | src/testdir/test_textprop.vim | 25 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 43 insertions, 0 deletions
diff --git a/src/testdir/dumps/Test_prop_above_empty_2.dump b/src/testdir/dumps/Test_prop_above_empty_2.dump new file mode 100644 index 000000000..c8c99e4f8 --- /dev/null +++ b/src/testdir/dumps/Test_prop_above_empty_2.dump @@ -0,0 +1,16 @@ +| +0#af5f00255#ffffff0@3|-+0#0000001#ffff4012@2| +0#0000000#ffffff0@52 +| +0#af5f00255&@1|1| |1+0#0000000&@7|$+0#4040ff13&| +0#0000000&@46 +| +0#af5f00255&@3|-+0#0000001#ffff4012@2| +0#0000000#ffffff0@52 +| +0#af5f00255&@1|2| |$+0#4040ff13&| +0#0000000&@54 +| +0#af5f00255&@3|-+0#0000001#ffff4012@2| +0#0000000#ffffff0@52 +| +0#af5f00255&@1|3| |3+0#0000000&@8|$+0#4040ff13&| +0#0000000&@45 +| +0#af5f00255&@3|-+0#0000001#ffff4012@2| +0#0000000#ffffff0@52 +| +0#af5f00255&@1|4| |$+0#4040ff13&| +0#0000000&@54 +| +0#af5f00255&@3|-+0#0000001#ffff4012@2| +0#0000000#ffffff0@52 +| +0#af5f00255&@1|5| >5+0#0000000&@10|$+0#4040ff13&| +0#0000000&@43 +|~+0#4040ff13&| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|:+0#0000000&|s|e|t| |l|i|s|t| @32|5|,|1|-|5|7| @7|A|l@1| diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim index f3d53f7f0..d7e34e24c 100644 --- a/src/testdir/test_textprop.vim +++ b/src/testdir/test_textprop.vim @@ -2804,6 +2804,31 @@ func Test_prop_with_text_above_below_empty() call StopVimInTerminal(buf) endfunc +func Test_prop_with_text_above_empty() + CheckRunVimInTerminal + + " check the cursor is in the correct line + let lines =<< trim END + setlocal number + call setline(1, ['11111111', '', '333333333', '', '55555555555']) + + let vt = 'test' + call prop_type_add(vt, {'highlight': 'ToDo'}) + for ln in range(1, line('$')) + call prop_add(ln, 0, {'type': vt, 'text': '---', 'text_align': 'above'}) + endfor + normal G + END + call writefile(lines, 'XscriptPropAboveEmpty', 'D') + let buf = RunVimInTerminal('-S XscriptPropAboveEmpty', #{rows: 16, cols: 60}) + call VerifyScreenDump(buf, 'Test_prop_above_empty_1', {}) + + call term_sendkeys(buf, ":set list\<CR>") + call VerifyScreenDump(buf, 'Test_prop_above_empty_2', {}) + + call StopVimInTerminal(buf) +endfunc + func Test_prop_with_text_below_after_match() CheckRunVimInTerminal diff --git a/src/version.c b/src/version.c index a26fd5d2a..f3877e429 100644 --- 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 */ /**/ + 1306, +/**/ 1305, /**/ 1304, |