summaryrefslogtreecommitdiffstats
path: root/src/testdir
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/dumps/Test_prop_normal_gj_gk_over_outer_virtual_text_1.dump16
-rw-r--r--src/testdir/dumps/Test_prop_normal_gj_gk_over_outer_virtual_text_2.dump16
-rw-r--r--src/testdir/dumps/Test_prop_normal_gj_gk_over_outer_virtual_text_3.dump16
-rw-r--r--src/testdir/test_textprop.vim39
4 files changed, 87 insertions, 0 deletions
diff --git a/src/testdir/dumps/Test_prop_normal_gj_gk_over_outer_virtual_text_1.dump b/src/testdir/dumps/Test_prop_normal_gj_gk_over_outer_virtual_text_1.dump
new file mode 100644
index 0000000000..7a0b8482cd
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_normal_gj_gk_over_outer_virtual_text_1.dump
@@ -0,0 +1,16 @@
+| +0#af5f00255#ffffff0@3|A+0#0000001#ffff4012|b|o|v|e| +0#0000000#ffffff0@30
+| +0#af5f00255&@1|1| |F+0#0000000&|i|r>s|t| |l|i|n|e| |f|i|t|s| |o|n| |s|c|r|e@1|n| |l|i|n|e|.|A+0#0000001#ffff4012|f|t|e|r
+| +0#af5f00255#ffffff0@3| +0#0000001#ffff4012|t|e|x|t| |w|r|a|p|s| |t|o| |n|e|x|t| |l|i|n|e|.| +0#0000000#ffffff0@10
+| +0#af5f00255&@3| +0#0000000&@5|R+0#0000001#ffff4012|i|g|h|t| |t|e|x|t| |w|r|a|p|s| |t|o| |n|e|x|t| |l|i|n|e|.
+| +0#af5f00255#ffffff0@3|B+0#0000001#ffff4012|e|l|o|w| +0#0000000#ffffff0@30
+| +0#af5f00255&@3|A+0#0000001#ffff4012|b|o|v|e| +0#0000000#ffffff0@30
+| +0#af5f00255&@1|2| |A+0#0000001#ffff4012|f|t|e|r| |t|e|x|t| |w|r|a|p|s| |t|o| |n|e|x|t| |l|i|n|e|.| +0#0000000#ffffff0@5
+| +0#af5f00255&@3| +0#0000000&@5|R+0#0000001#ffff4012|i|g|h|t| |t|e|x|t| |w|r|a|p|s| |t|o| |n|e|x|t| |l|i|n|e|.
+| +0#af5f00255#ffffff0@3| +0#0000000&@35
+| +0#af5f00255&@3|B+0#0000001#ffff4012|e|l|o|w| +0#0000000#ffffff0@30
+| +0#af5f00255&@3|A+0#0000001#ffff4012|b|o|v|e| +0#0000000#ffffff0@30
+| +0#af5f00255&@1|3| |T+0#0000000&|h|i|r|d| |l|i|n|e| |f|i|t|s| |o|n| |s|c|r|e@1|n| |l|i|n|e|.|A+0#0000001#ffff4012|f|t|e|r
+| +0#af5f00255#ffffff0@3| +0#0000001#ffff4012|t|e|x|t| |w|r|a|p|s| |t|o| |n|e|x|t| |l|i|n|e|.| +0#0000000#ffffff0@10
+| +0#af5f00255&@3| +0#0000000&@5|R+0#0000001#ffff4012|i|g|h|t| |t|e|x|t| |w|r|a|p|s| |t|o| |n|e|x|t| |l|i|n|e|.
+| +0#af5f00255#ffffff0@3|B+0#0000001#ffff4012|e|l|o|w| +0#0000000#ffffff0@30
+@22|1|,|4|-|4|0| @7|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_normal_gj_gk_over_outer_virtual_text_2.dump b/src/testdir/dumps/Test_prop_normal_gj_gk_over_outer_virtual_text_2.dump
new file mode 100644
index 0000000000..d4639906f8
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_normal_gj_gk_over_outer_virtual_text_2.dump
@@ -0,0 +1,16 @@
+| +0#af5f00255#ffffff0@3|A+0#0000001#ffff4012|b|o|v|e| +0#0000000#ffffff0@30
+| +0#af5f00255&@1|1| |F+0#0000000&|i|r|s|t| |l|i|n|e| |f|i|t|s| |o|n| |s|c|r|e@1|n| |l|i|n|e|.|A+0#0000001#ffff4012|f|t|e|r
+| +0#af5f00255#ffffff0@3| +0#0000001#ffff4012|t|e|x|t| |w|r|a|p|s| |t|o| |n|e|x|t| |l|i|n|e|.| +0#0000000#ffffff0@10
+| +0#af5f00255&@3| +0#0000000&@5|R+0#0000001#ffff4012|i|g|h|t| |t|e|x|t| |w|r|a|p|s| |t|o| |n|e|x|t| |l|i|n|e|.
+| +0#af5f00255#ffffff0@3|B+0#0000001#ffff4012|e|l|o|w| +0#0000000#ffffff0@30
+| +0#af5f00255&@3|A+0#0000001#ffff4012|b|o|v|e| +0#0000000#ffffff0@30
+| +0#af5f00255&@1|2| >A+0#0000001#ffff4012|f|t|e|r| |t|e|x|t| |w|r|a|p|s| |t|o| |n|e|x|t| |l|i|n|e|.| +0#0000000#ffffff0@5
+| +0#af5f00255&@3| +0#0000000&@5|R+0#0000001#ffff4012|i|g|h|t| |t|e|x|t| |w|r|a|p|s| |t|o| |n|e|x|t| |l|i|n|e|.
+| +0#af5f00255#ffffff0@3| +0#0000000&@35
+| +0#af5f00255&@3|B+0#0000001#ffff4012|e|l|o|w| +0#0000000#ffffff0@30
+| +0#af5f00255&@3|A+0#0000001#ffff4012|b|o|v|e| +0#0000000#ffffff0@30
+| +0#af5f00255&@1|3| |T+0#0000000&|h|i|r|d| |l|i|n|e| |f|i|t|s| |o|n| |s|c|r|e@1|n| |l|i|n|e|.|A+0#0000001#ffff4012|f|t|e|r
+| +0#af5f00255#ffffff0@3| +0#0000001#ffff4012|t|e|x|t| |w|r|a|p|s| |t|o| |n|e|x|t| |l|i|n|e|.| +0#0000000#ffffff0@10
+| +0#af5f00255&@3| +0#0000000&@5|R+0#0000001#ffff4012|i|g|h|t| |t|e|x|t| |w|r|a|p|s| |t|o| |n|e|x|t| |l|i|n|e|.
+| +0#af5f00255#ffffff0@3|B+0#0000001#ffff4012|e|l|o|w| +0#0000000#ffffff0@30
+@22|2|,|0|-|3|7| @7|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_normal_gj_gk_over_outer_virtual_text_3.dump b/src/testdir/dumps/Test_prop_normal_gj_gk_over_outer_virtual_text_3.dump
new file mode 100644
index 0000000000..85a469dcd9
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_normal_gj_gk_over_outer_virtual_text_3.dump
@@ -0,0 +1,16 @@
+| +0#af5f00255#ffffff0@3|A+0#0000001#ffff4012|b|o|v|e| +0#0000000#ffffff0@30
+| +0#af5f00255&@1|1| |F+0#0000000&|i|r|s|t| |l|i|n|e| |f|i|t|s| |o|n| |s|c|r|e@1|n| |l|i|n|e|.|A+0#0000001#ffff4012|f|t|e|r
+| +0#af5f00255#ffffff0@3| +0#0000001#ffff4012|t|e|x|t| |w|r|a|p|s| |t|o| |n|e|x|t| |l|i|n|e|.| +0#0000000#ffffff0@10
+| +0#af5f00255&@3| +0#0000000&@5|R+0#0000001#ffff4012|i|g|h|t| |t|e|x|t| |w|r|a|p|s| |t|o| |n|e|x|t| |l|i|n|e|.
+| +0#af5f00255#ffffff0@3|B+0#0000001#ffff4012|e|l|o|w| +0#0000000#ffffff0@30
+| +0#af5f00255&@3|A+0#0000001#ffff4012|b|o|v|e| +0#0000000#ffffff0@30
+| +0#af5f00255&@1|2| |A+0#0000001#ffff4012|f|t|e|r| |t|e|x|t| |w|r|a|p|s| |t|o| |n|e|x|t| |l|i|n|e|.| +0#0000000#ffffff0@5
+| +0#af5f00255&@3| +0#0000000&@5|R+0#0000001#ffff4012|i|g|h|t| |t|e|x|t| |w|r|a|p|s| |t|o| |n|e|x|t| |l|i|n|e|.
+| +0#af5f00255#ffffff0@3| +0#0000000&@35
+| +0#af5f00255&@3|B+0#0000001#ffff4012|e|l|o|w| +0#0000000#ffffff0@30
+| +0#af5f00255&@3|A+0#0000001#ffff4012|b|o|v|e| +0#0000000#ffffff0@30
+| +0#af5f00255&@1|3| |T+0#0000000&|h|i>r|d| |l|i|n|e| |f|i|t|s| |o|n| |s|c|r|e@1|n| |l|i|n|e|.|A+0#0000001#ffff4012|f|t|e|r
+| +0#af5f00255#ffffff0@3| +0#0000001#ffff4012|t|e|x|t| |w|r|a|p|s| |t|o| |n|e|x|t| |l|i|n|e|.| +0#0000000#ffffff0@10
+| +0#af5f00255&@3| +0#0000000&@5|R+0#0000001#ffff4012|i|g|h|t| |t|e|x|t| |w|r|a|p|s| |t|o| |n|e|x|t| |l|i|n|e|.
+| +0#af5f00255#ffffff0@3|B+0#0000001#ffff4012|e|l|o|w| +0#0000000#ffffff0@30
+@22|3|,|4|-|4|0| @7|A|l@1|
diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim
index a06f733706..a7057147d4 100644
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -2690,6 +2690,45 @@ func Test_prop_inserts_text_normal_gj_gk()
call Run_test_prop_inserts_text_normal_gj_gk('set virtualedit=all')
endfunc
+func Test_prop_normal_gj_gk_over_outer_virtual_text()
+ CheckRunVimInTerminal
+
+ let lines =<< trim END
+ vim9script
+ setlocal number
+ setline(1, ['First line fits on screen line.', '', 'Third line fits on screen line.'])
+
+ var vt = 'test'
+ prop_type_add(vt, {highlight: 'ToDo'})
+ for ln in range(1, line('$'))
+ prop_add(ln, 0, {type: vt, text: 'Above', text_align: 'above'})
+ prop_add(ln, 0, {type: vt, text: 'After text wraps to next line.', text_align: 'after', text_wrap: 'wrap'})
+ prop_add(ln, 0, {type: vt, text: 'Right text wraps to next line.', text_align: 'right', text_wrap: 'wrap'})
+ prop_add(ln, 0, {type: vt, text: 'Below', text_align: 'below'})
+ endfor
+ normal 3l
+ END
+ call writefile(lines, 'XscriptPropsNormal_gj_gk_over_outer', 'D')
+ let buf = RunVimInTerminal('-S XscriptPropsNormal_gj_gk_over_outer', #{rows: 16, cols: 40})
+ call VerifyScreenDump(buf, 'Test_prop_normal_gj_gk_over_outer_virtual_text_1', {})
+
+ call term_sendkeys(buf, "gj")
+ call VerifyScreenDump(buf, 'Test_prop_normal_gj_gk_over_outer_virtual_text_2', {})
+ call term_sendkeys(buf, "gj")
+ call VerifyScreenDump(buf, 'Test_prop_normal_gj_gk_over_outer_virtual_text_3', {})
+ call term_sendkeys(buf, "gk")
+ call VerifyScreenDump(buf, 'Test_prop_normal_gj_gk_over_outer_virtual_text_2', {})
+ call term_sendkeys(buf, "gk")
+ call VerifyScreenDump(buf, 'Test_prop_normal_gj_gk_over_outer_virtual_text_1', {})
+
+ call term_sendkeys(buf, "2gj")
+ call VerifyScreenDump(buf, 'Test_prop_normal_gj_gk_over_outer_virtual_text_3', {})
+ call term_sendkeys(buf, "2gk")
+ call VerifyScreenDump(buf, 'Test_prop_normal_gj_gk_over_outer_virtual_text_1', {})
+
+ call StopVimInTerminal(buf)
+endfunc
+
func Test_prop_inserts_text_visual_block()
CheckRunVimInTerminal