summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_textprop.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-12-06 14:17:57 +0000
committerBram Moolenaar <Bram@vim.org>2022-12-06 14:17:57 +0000
commit56a40fea9c28f8fc918a0db6de4c048da241cf32 (patch)
tree15a5a0949287b173557a778cf3ee92230975ab40 /src/testdir/test_textprop.vim
parent7155fb6614f45a4e573bbfca23b5d150604ad506 (diff)
patch 9.0.1019: 'smoothscroll' and virtual text above don't work togetherv9.0.1019
Problem: 'smoothscroll' and virtual text above don't work together. (Yee Cheng Chin) Solution: Skip virtual text above when w_skipcol is non-zero. (closes #11665)
Diffstat (limited to 'src/testdir/test_textprop.vim')
-rw-r--r--src/testdir/test_textprop.vim28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim
index 6493aef5c9..1bda87fe99 100644
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -3113,6 +3113,34 @@ func Test_prop_below_split_line()
call StopVimInTerminal(buf)
endfunc
+func Test_prop_above_below_smoothscroll()
+ CheckRunVimInTerminal
+
+ let lines =<< trim END
+ vim9script
+ setline(1, range(1, 10)->mapnew((_, v) => '" line ' .. v))
+
+ set smoothscroll wrap
+ call prop_type_add('mytype', {highlight: 'DiffChange'})
+ call prop_add(3, 0, {text: "insert above", type: "mytype", text_align: 'above'})
+ call prop_add(5, 0, {text: "insert above 1", type: "mytype", text_align: 'above'})
+ call prop_add(5, 0, {text: "insert above 2", type: "mytype", text_align: 'above'})
+ call prop_add(7, 0, {text: "insert below", type: "mytype", text_align: 'below'})
+ call prop_add(9, 0, {text: "insert below 1", type: "mytype", text_align: 'below'})
+ call prop_add(9, 0, {text: "insert below 2", type: "mytype", text_align: 'below'})
+ END
+ call writefile(lines, 'XscriptPropsSmoothscroll', 'D')
+ let buf = RunVimInTerminal('-S XscriptPropsSmoothscroll', #{rows: 8, cols: 60})
+ call VerifyScreenDump(buf, 'Test_prop_above_below_smoothscroll_1', {})
+
+ for nr in range(2, 16)
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_prop_above_below_smoothscroll_' .. nr, {})
+ endfor
+
+ call StopVimInTerminal(buf)
+endfunc
+
func Test_props_with_text_override()
CheckRunVimInTerminal