diff options
Diffstat (limited to 'src/testdir')
6 files changed, 71 insertions, 0 deletions
diff --git a/src/testdir/dumps/Test_prop_insert_start_incl_1.dump b/src/testdir/dumps/Test_prop_insert_start_incl_1.dump new file mode 100644 index 000000000..deb67d50b --- /dev/null +++ b/src/testdir/dumps/Test_prop_insert_start_incl_1.dump @@ -0,0 +1,8 @@ +|t+0&#ffffff0|e|x|t| |a+0#4040ff13&|f|t|e|r| >o+0#0000000&|n|e| |t|e|x|t| |b+0#4040ff13&|e|f|o|r|e| |t+0#0000000&|w|o| @29 +|~+0#4040ff13&| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +| +0#0000000&@41|1|,|6|-|1|2| @7|A|l@1| diff --git a/src/testdir/dumps/Test_prop_insert_start_incl_2.dump b/src/testdir/dumps/Test_prop_insert_start_incl_2.dump new file mode 100644 index 000000000..73cf64881 --- /dev/null +++ b/src/testdir/dumps/Test_prop_insert_start_incl_2.dump @@ -0,0 +1,8 @@ +|t+0&#ffffff0|e|x|t| |a+0#4040ff13&|f|t|e|r| >o+0#0000000&|n|e| |t|e|x|t| |b+0#4040ff13&|e|f|o|r|e| |t+0#0000000&|w|o| @29 +|~+0#4040ff13&| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@29|1|,|6|-|1|2| @7|A|l@1| diff --git a/src/testdir/dumps/Test_prop_insert_start_incl_3.dump b/src/testdir/dumps/Test_prop_insert_start_incl_3.dump new file mode 100644 index 000000000..cc4de01c7 --- /dev/null +++ b/src/testdir/dumps/Test_prop_insert_start_incl_3.dump @@ -0,0 +1,8 @@ +|t+0&#ffffff0|e|x|t| |a+0#4040ff13&|f|t|e|r| |x+0#0000000&>x|o|n|e| |t|e|x|t| |b+0#4040ff13&|e|f|o|r|e| |t+0#0000000&|w|o| @27 +|~+0#4040ff13&| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +| +0#0000000&@41|1|,|7|-|1|3| @7|A|l@1| diff --git a/src/testdir/dumps/Test_prop_insert_start_incl_4.dump b/src/testdir/dumps/Test_prop_insert_start_incl_4.dump new file mode 100644 index 000000000..75e258023 --- /dev/null +++ b/src/testdir/dumps/Test_prop_insert_start_incl_4.dump @@ -0,0 +1,8 @@ +|t+0&#ffffff0|e|x|t| |a+0#4040ff13&|f|t|e|r| |x+0#0000000&@1|o|n|e| |t|e|x|t| >b+0#4040ff13&|e|f|o|r|e| |t+0#0000000&|w|o| @27 +|~+0#4040ff13&| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@29|1|,|1|7|-|2|3| @6|A|l@1| diff --git a/src/testdir/dumps/Test_prop_insert_start_incl_5.dump b/src/testdir/dumps/Test_prop_insert_start_incl_5.dump new file mode 100644 index 000000000..5cbee12e3 --- /dev/null +++ b/src/testdir/dumps/Test_prop_insert_start_incl_5.dump @@ -0,0 +1,8 @@ +|t+0&#ffffff0|e|x|t| |a+0#4040ff13&|f|t|e|r| |x+0#0000000&@1|o|n|e| |t|e|x|t| |y>y|b+0#4040ff13&|e|f|o|r|e| |t+0#0000000&|w|o| @25 +|~+0#4040ff13&| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +|~| @58 +| +0#0000000&@41|1|,|1|8|-|2|4| @6|A|l@1| diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim index b702340a3..2e72db9b9 100644 --- a/src/testdir/test_textprop.vim +++ b/src/testdir/test_textprop.vim @@ -2914,4 +2914,35 @@ def Test_insert_text_before_virtual_text() bwipe! enddef +func Test_insert_text_start_incl() + CheckRunVimInTerminal + + let lines =<< trim END + vim9script + setline(1, 'text one text two') + + prop_type_add('propincl', {highlight: 'NonText', start_incl: true}) + prop_add(1, 6, {type: 'propincl', text: 'after '}) + cursor(1, 6) + prop_type_add('propnotincl', {highlight: 'NonText', start_incl: false}) + prop_add(1, 15, {type: 'propnotincl', text: 'before '}) + END + call writefile(lines, 'XscriptPropsStartIncl') + let buf = RunVimInTerminal('-S XscriptPropsStartIncl', #{rows: 8, cols: 60}) + call VerifyScreenDump(buf, 'Test_prop_insert_start_incl_1', {}) + + call term_sendkeys(buf, "i") + call VerifyScreenDump(buf, 'Test_prop_insert_start_incl_2', {}) + call term_sendkeys(buf, "xx\<Esc>") + call VerifyScreenDump(buf, 'Test_prop_insert_start_incl_3', {}) + + call term_sendkeys(buf, "2wi") + call VerifyScreenDump(buf, 'Test_prop_insert_start_incl_4', {}) + call term_sendkeys(buf, "yy\<Esc>") + call VerifyScreenDump(buf, 'Test_prop_insert_start_incl_5', {}) + + call StopVimInTerminal(buf) + call delete('XscriptPropsStartIncl') +endfunc + " vim: shiftwidth=2 sts=2 expandtab |