summaryrefslogtreecommitdiff
path: root/src/testdir
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-08-14 19:37:36 +0100
committerBram Moolenaar <Bram@vim.org>2022-08-14 19:37:36 +0100
commitc3a483fc3c65f649f9985bb88792a465ea18b0a2 (patch)
treef8d15c03e75300f3208c1b36a3a7cd4f23af0c03 /src/testdir
parent677a39fdf6a61d77ae5d14faeb498f94fd8742ff (diff)
downloadvim-git-c3a483fc3c65f649f9985bb88792a465ea18b0a2.tar.gz
patch 9.0.0210: 'list' mode does not work properly with virtual textv9.0.0210
Problem: 'list' mode does not work properly with virtual text. Solution: Show the "$" at the right position. (closes #10913)
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/dumps/Test_prop_insert_list_mode_1.dump8
-rw-r--r--src/testdir/dumps/Test_prop_insert_list_mode_2.dump8
-rw-r--r--src/testdir/dumps/Test_prop_insert_list_mode_3.dump8
-rw-r--r--src/testdir/test_textprop.vim30
4 files changed, 54 insertions, 0 deletions
diff --git a/src/testdir/dumps/Test_prop_insert_list_mode_1.dump b/src/testdir/dumps/Test_prop_insert_list_mode_1.dump
new file mode 100644
index 000000000..3f481d546
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_insert_list_mode_1.dump
@@ -0,0 +1,8 @@
+|T+0&#ffffff0|h|i|s| |i|s| |a| |l|i|n|e| |w|i|t|h| |q|u|i|t|e| |a| |b|i|t| |o|f| |t|e|x|t| |h|e|r|e|.|$+0#4040ff13&|T+0#ffffff16#ff404010|h|e| |q|u|i|c|k| |b|r|o|…
+>s+0#0000000#ffffff0|e|c|o|n|d| |l|i|n|e|$+0#4040ff13&| +0#0000000&@47
+|t|h|i|r|d| |l|i|n|e|$+0#4040ff13&| +0#0000000&@48
+|~+0#4040ff13&| @58
+|~| @58
+|~| @58
+|~| @58
+| +0#0000000&@41|2|,|1| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_insert_list_mode_2.dump b/src/testdir/dumps/Test_prop_insert_list_mode_2.dump
new file mode 100644
index 000000000..26abd8812
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_insert_list_mode_2.dump
@@ -0,0 +1,8 @@
+|T+0&#ffffff0|h|i|s| |i|s| |a| |l|i|n|e| |w|i|t|h| |q|u|i|t|e| |a| |b|i|t| |o|f| |t|e|x|t| |h|e|r|e|.|$+0#4040ff13&|T+0#ffffff16#ff404010|h|e| |q|u|i|c|k| |b|r|o|»+0#4040ff13#ffffff0
+>s+0#0000000&|e|c|o|n|d| |l|i|n|e|$+0#4040ff13&| +0#0000000&@47
+|t|h|i|r|d| |l|i|n|e|$+0#4040ff13&| +0#0000000&@48
+|~+0#4040ff13&| @58
+|~| @58
+|~| @58
+|~| @58
+|:+0#0000000&|s|e|t| |n|o|w|r|a|p| @30|2|,|1| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_insert_list_mode_3.dump b/src/testdir/dumps/Test_prop_insert_list_mode_3.dump
new file mode 100644
index 000000000..58db9f69d
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_insert_list_mode_3.dump
@@ -0,0 +1,8 @@
+>o+0&#ffffff0|f| |t|e|x|t| |h|e|r|e|.|$+0#4040ff13&| +0#0000000&@2|T+0#ffffff16#ff404010|h|e| |q|u|i|c|k| |b|r|o|w|n| |f|o|x| |j|u|m|p|s| |o|v|e|r| |t|h|e| |l|a|z|y| |d|o|g
+|s+0#0000000#ffffff0|e|c|o|n|d| |l|i|n|e|$+0#4040ff13&| +0#0000000&@47
+|t|h|i|r|d| |l|i|n|e|$+0#4040ff13&| +0#0000000&@48
+|~+0#4040ff13&| @58
+|~| @58
+|~| @58
+|~| @58
+|:+0#0000000&|s|e|t| |n|o|w|r|a|p| @30|1|,|1| @10|A|l@1|
diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim
index db17e79bd..c3802103c 100644
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -2969,4 +2969,34 @@ func Test_insert_text_start_incl()
call delete('XscriptPropsStartIncl')
endfunc
+func Test_insert_text_list_mode()
+ CheckRunVimInTerminal
+
+ let lines =<< trim END
+ vim9script
+ setline(1, ['This is a line with quite a bit of text here.',
+ 'second line', 'third line'])
+ set list listchars+=extends:»
+ prop_type_add('Prop1', {highlight: 'Error'})
+ prop_add(1, 0, {
+ type: 'Prop1',
+ text: 'The quick brown fox jumps over the lazy dog',
+ text_align: 'right'
+ })
+ END
+ call writefile(lines, 'XscriptPropsListMode')
+ let buf = RunVimInTerminal('-S XscriptPropsListMode', #{rows: 8, cols: 60})
+ call term_sendkeys(buf, "ggj")
+ call VerifyScreenDump(buf, 'Test_prop_insert_list_mode_1', {})
+
+ call term_sendkeys(buf, ":set nowrap\<CR>")
+ call VerifyScreenDump(buf, 'Test_prop_insert_list_mode_2', {})
+
+ call term_sendkeys(buf, "ggd32l")
+ call VerifyScreenDump(buf, 'Test_prop_insert_list_mode_3', {})
+
+ call StopVimInTerminal(buf)
+ call delete('XscriptPropsListMode')
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab