patch 8.1.1341: text properties are lost when joining lines
Problem: Text properties are lost when joining lines.
Solution: Move the text properties to the joined line.
diff --git a/src/testdir/dumps/Test_textprop_01.dump b/src/testdir/dumps/Test_textprop_01.dump
index bda2a56..9d3eb5c 100644
--- a/src/testdir/dumps/Test_textprop_01.dump
+++ b/src/testdir/dumps/Test_textprop_01.dump
@@ -2,6 +2,7 @@
| +0#af5f00255&@1|2| |N+0#0000000#ffff4012|u|m|b|é|r| |1+0#4040ff13&|2|3| +0#0000000&|ä|n|d| |t|h|œ|n| |4+0#4040ff13&|¾|7|.+0#0000000&| +0&#ffffff0@46
| +0#af5f00255&@1|3| >-+8#0000000#ffff4012|x+8&#ffffff0|a+8#4040ff13&@1|x+8#0000000&|-@1|x+8#4040ff13&|b@1|x+8#0000000&|-@1|x|c+8#4040ff13&@1|x|-+8#0000000&@1|x+8#4040ff13&|d@1|x|-+8#0000000&@1| @45
| +0#af5f00255&@1|4| |/+0#40ff4011&@1| |c|o|m@1|e|n|t| |w+0&#e0e0e08|i|t|h| |e+8&&|r@1|o|r| +0&#ffffff0|i|n| |i|t| +0#0000000&@43
+| +0#af5f00255&@1|5| |f+0#0000000&|i|r|s|t| |l+0&#ffff4012|i|n|e| @1|s|e|c|o|n|d| +0&#ffffff0|l|i|n|e| @1|t|h|i|r|d| |l|i|n|e| |f|o|u|r|t|h| |l+0&#ffff4012|i|n|e| +0&#ffffff0@23
|~+0#4040ff13&| @73
|~| @73
| +0#0000000&@56|3|,|1| @10|A|l@1|
diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim
index dc229c0..635902c 100644
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -624,6 +624,10 @@
\ .. "'Numbér 123 änd thœn 4¾7.',"
\ .. "'--aa--bb--cc--dd--',"
\ .. "'// comment with error in it',"
+ \ .. "'first line',"
+ \ .. "' second line ',"
+ \ .. "'third line',"
+ \ .. "' fourth line',"
\ .. "])",
\ "hi NumberProp ctermfg=blue",
\ "hi LongProp ctermbg=yellow",
@@ -645,6 +649,10 @@
\ "call prop_add(3, 15, {'length': 2, 'type': 'both'})",
\ "call prop_add(4, 12, {'length': 10, 'type': 'background'})",
\ "call prop_add(4, 17, {'length': 5, 'type': 'error'})",
+ \ "call prop_add(5, 7, {'length': 4, 'type': 'long'})",
+ \ "call prop_add(6, 1, {'length': 8, 'type': 'long'})",
+ \ "call prop_add(8, 1, {'length': 1, 'type': 'long'})",
+ \ "call prop_add(8, 11, {'length': 4, 'type': 'long'})",
\ "set number cursorline",
\ "hi clear SpellBad",
\ "set spell",
@@ -652,8 +660,11 @@
\ "hi Comment ctermfg=green",
\ "normal 3G0llix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>lllix\<Esc>",
\ "normal 3G0lli\<BS>\<Esc>",
+ \ "normal 6G0i\<BS>\<Esc>",
+ \ "normal 3J",
+ \ "normal 3G",
\], 'XtestProp')
- let buf = RunVimInTerminal('-S XtestProp', {'rows': 7})
+ let buf = RunVimInTerminal('-S XtestProp', {'rows': 8})
call VerifyScreenDump(buf, 'Test_textprop_01', {})
" clean up