patch 9.0.1783: Display issues with virt text smoothscroll and showbreak
Problem: Wrong display with wrapping virtual text or unprintable chars,
'showbreak' and 'smoothscroll'.
Solution: Don't skip cells taken by 'showbreak' in screen lines before
"w_skipcol". Combined "n_skip" and "skip_cells".
closes: #12597
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
diff --git a/src/testdir/dumps/Test_prop_before_tab_skipcol_1.dump b/src/testdir/dumps/Test_prop_before_tab_skipcol_1.dump
new file mode 100644
index 0000000..7f6f0f1
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_before_tab_skipcol_1.dump
@@ -0,0 +1,6 @@
+|<+0#0000e05#ffffff0|-@5|>|<|-@5|>|<|-@5|>|1+0#e000e06&|2|1|2|1|2
+|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2
+|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|<+0#0000e05&|-
+@5|>>a+0#0000000&| @22
+|~+0#4040ff13&| @28
+| +0#0000000&@14|1|,|5|-|9|7| @4|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_before_tab_skipcol_10.dump b/src/testdir/dumps/Test_prop_before_tab_skipcol_10.dump
new file mode 100644
index 0000000..06bcf1e
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_before_tab_skipcol_10.dump
@@ -0,0 +1,6 @@
+|<+0#4040ff13#ffffff0@2|2+0#e000e06&|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2| +0#0000000&@1
+@5> |a| @22
+|~+0#4040ff13&| @28
+|~| @28
+|~| @28
+| +0#0000000&@14|1|,|4|-|9|6| @4|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_before_tab_skipcol_11.dump b/src/testdir/dumps/Test_prop_before_tab_skipcol_11.dump
new file mode 100644
index 0000000..78dc018
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_before_tab_skipcol_11.dump
@@ -0,0 +1,6 @@
+|<+0#4040ff13#ffffff0@2| +0#e000e06&@1> |a+0#0000000&| @22
+|~+0#4040ff13&| @28
+|~| @28
+|~| @28
+|~| @28
+| +0#0000000&@14|1|,|4|-|9|6| @4|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_before_tab_skipcol_2.dump b/src/testdir/dumps/Test_prop_before_tab_skipcol_2.dump
new file mode 100644
index 0000000..455b6f3
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_before_tab_skipcol_2.dump
@@ -0,0 +1,6 @@
+|<+0#4040ff13#ffffff0@2|2+0#e000e06&|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2
+|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|<+0#0000e05&|-
+@5|>>a+0#0000000&| @22
+|~+0#4040ff13&| @28
+|~| @28
+| +0#0000000&@14|1|,|5|-|9|7| @4|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_before_tab_skipcol_3.dump b/src/testdir/dumps/Test_prop_before_tab_skipcol_3.dump
new file mode 100644
index 0000000..be24c1a
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_before_tab_skipcol_3.dump
@@ -0,0 +1,6 @@
+|<+0#4040ff13#ffffff0@2|2+0#e000e06&|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|<+0#0000e05&|-
+@5|>>a+0#0000000&| @22
+|~+0#4040ff13&| @28
+|~| @28
+|~| @28
+| +0#0000000&@14|1|,|5|-|9|7| @4|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_before_tab_skipcol_4.dump b/src/testdir/dumps/Test_prop_before_tab_skipcol_4.dump
new file mode 100644
index 0000000..81fa878
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_before_tab_skipcol_4.dump
@@ -0,0 +1,6 @@
+|<+0#4040ff13#ffffff0@2|-+0#0000e05&@1|>>a+0#0000000&| @22
+|~+0#4040ff13&| @28
+|~| @28
+|~| @28
+|~| @28
+| +0#0000000&@14|1|,|5|-|9|7| @4|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_before_tab_skipcol_5.dump b/src/testdir/dumps/Test_prop_before_tab_skipcol_5.dump
new file mode 100644
index 0000000..517ba78
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_before_tab_skipcol_5.dump
@@ -0,0 +1,6 @@
+|<+0#0000e05#ffffff0|-@5|>|<|-@5|>|<|-@5|>|1+0#e000e06&|2|1|2|1|2
+|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2
+|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2><+0#0000e05&|-
+@5|>|a+0#0000000&| @22
+|~+0#4040ff13&| @28
+| +0#0000000&@14|1|,|4|-|8|9| @4|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_before_tab_skipcol_6.dump b/src/testdir/dumps/Test_prop_before_tab_skipcol_6.dump
new file mode 100644
index 0000000..78f0e04
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_before_tab_skipcol_6.dump
@@ -0,0 +1,6 @@
+|<+0#0000e05#ffffff0|-@5|>|<|-@5|>|<|-@5|>>1+0#e000e06&|2|1|2|1|2
+|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2
+|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|<+0#0000e05&|-
+@5|>|a+0#0000000&| @22
+|~+0#4040ff13&| @28
+|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@2|1|,|4|-|2|5| @4|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_before_tab_skipcol_7.dump b/src/testdir/dumps/Test_prop_before_tab_skipcol_7.dump
new file mode 100644
index 0000000..a115e66
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_before_tab_skipcol_7.dump
@@ -0,0 +1,6 @@
+| +0&#ffffff0@23>1+0#e000e06&|2|1|2|1|2
+|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2
+|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2| +0#0000000&@1
+@6|a| @22
+|~+0#4040ff13&| @28
+|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@2|1|,|4|-|2|5| @4|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_before_tab_skipcol_8.dump b/src/testdir/dumps/Test_prop_before_tab_skipcol_8.dump
new file mode 100644
index 0000000..819fddc
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_before_tab_skipcol_8.dump
@@ -0,0 +1,6 @@
+| +0&#ffffff0@23|1+0#e000e06&|2|1|2|1|2
+|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2
+|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2| +0#0000000&@1
+@5> |a| @22
+|~+0#4040ff13&| @28
+| +0#0000000&@14|1|,|4|-|9|6| @4|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_before_tab_skipcol_9.dump b/src/testdir/dumps/Test_prop_before_tab_skipcol_9.dump
new file mode 100644
index 0000000..0bbe05e
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_before_tab_skipcol_9.dump
@@ -0,0 +1,6 @@
+|<+0#4040ff13#ffffff0@2|2+0#e000e06&|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2
+|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2| +0#0000000&@1
+@5> |a| @22
+|~+0#4040ff13&| @28
+|~| @28
+| +0#0000000&@14|1|,|4|-|9|6| @4|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_inserts_text_showbreak_1.dump b/src/testdir/dumps/Test_prop_inserts_text_showbreak_1.dump
new file mode 100644
index 0000000..fbe4e4b
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_inserts_text_showbreak_1.dump
@@ -0,0 +1,6 @@
+| +0&#ffffff0@1|1| |a@25
+| @5|++0#4040ff13&|a+0#0000000&|1+0#e000e06&|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1
+| +0#0000000&@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3
+| +0#0000000&@5|++0#4040ff13&|1+0#e000e06&|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2
+| +0#0000000&@5|++0#4040ff13&|3+0#e000e06&>a+0#0000000&| @20
+|:|s|e|t| |n|o|r|u|l|e|r| @17
diff --git a/src/testdir/dumps/Test_prop_inserts_text_showbreak_10.dump b/src/testdir/dumps/Test_prop_inserts_text_showbreak_10.dump
new file mode 100644
index 0000000..6acf664
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_inserts_text_showbreak_10.dump
@@ -0,0 +1,6 @@
+| +0&#ffffff0@5|++0#4040ff13&|3+0#e000e06&|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1
+| +0#0000000&@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3
+| +0#0000000&@5|++0#4040ff13&>a+0#0000000&| @21
+|~+0#4040ff13&| @28
+|~| @28
+| +0#0000000&@29
diff --git a/src/testdir/dumps/Test_prop_inserts_text_showbreak_11.dump b/src/testdir/dumps/Test_prop_inserts_text_showbreak_11.dump
new file mode 100644
index 0000000..39937c9
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_inserts_text_showbreak_11.dump
@@ -0,0 +1,6 @@
+| +0&#ffffff0@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3
+| +0#0000000&@5|++0#4040ff13&>a+0#0000000&| @21
+|~+0#4040ff13&| @28
+|~| @28
+|~| @28
+| +0#0000000&@29
diff --git a/src/testdir/dumps/Test_prop_inserts_text_showbreak_12.dump b/src/testdir/dumps/Test_prop_inserts_text_showbreak_12.dump
new file mode 100644
index 0000000..5624744
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_inserts_text_showbreak_12.dump
@@ -0,0 +1,6 @@
+| +0&#ffffff0@5|++0#4040ff13&>a+0#e000e06&| +0#0000000&@21
+|~+0#4040ff13&| @28
+|~| @28
+|~| @28
+|~| @28
+| +0#0000000&@29
diff --git a/src/testdir/dumps/Test_prop_inserts_text_showbreak_13.dump b/src/testdir/dumps/Test_prop_inserts_text_showbreak_13.dump
new file mode 100644
index 0000000..98ff0bf
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_inserts_text_showbreak_13.dump
@@ -0,0 +1,6 @@
+| +0&#ffffff0@1|1| |a@2|1+0#e000e06&|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2
+| +0#0000000&@5|++0#4040ff13&|3+0#e000e06&|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1
+| +0#0000000&@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3
+| +0#0000000&@5|++0#4040ff13&>a+0#0000000&| @21
+|~+0#4040ff13&| @28
+| +0#0000000&@29
diff --git a/src/testdir/dumps/Test_prop_inserts_text_showbreak_14.dump b/src/testdir/dumps/Test_prop_inserts_text_showbreak_14.dump
new file mode 100644
index 0000000..6acf664
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_inserts_text_showbreak_14.dump
@@ -0,0 +1,6 @@
+| +0&#ffffff0@5|++0#4040ff13&|3+0#e000e06&|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1
+| +0#0000000&@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3
+| +0#0000000&@5|++0#4040ff13&>a+0#0000000&| @21
+|~+0#4040ff13&| @28
+|~| @28
+| +0#0000000&@29
diff --git a/src/testdir/dumps/Test_prop_inserts_text_showbreak_15.dump b/src/testdir/dumps/Test_prop_inserts_text_showbreak_15.dump
new file mode 100644
index 0000000..39937c9
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_inserts_text_showbreak_15.dump
@@ -0,0 +1,6 @@
+| +0&#ffffff0@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3
+| +0#0000000&@5|++0#4040ff13&>a+0#0000000&| @21
+|~+0#4040ff13&| @28
+|~| @28
+|~| @28
+| +0#0000000&@29
diff --git a/src/testdir/dumps/Test_prop_inserts_text_showbreak_16.dump b/src/testdir/dumps/Test_prop_inserts_text_showbreak_16.dump
new file mode 100644
index 0000000..5624744
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_inserts_text_showbreak_16.dump
@@ -0,0 +1,6 @@
+| +0&#ffffff0@5|++0#4040ff13&>a+0#e000e06&| +0#0000000&@21
+|~+0#4040ff13&| @28
+|~| @28
+|~| @28
+|~| @28
+| +0#0000000&@29
diff --git a/src/testdir/dumps/Test_prop_inserts_text_showbreak_17.dump b/src/testdir/dumps/Test_prop_inserts_text_showbreak_17.dump
new file mode 100644
index 0000000..2ae67a1
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_inserts_text_showbreak_17.dump
@@ -0,0 +1,6 @@
+| +0&#ffffff0@1|1| |a@2>1+0#e000e06&|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2
+| +0#0000000&@5|++0#4040ff13&|3+0#e000e06&|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1
+| +0#0000000&@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3
+| +0#0000000&@5|++0#4040ff13&|a+0#0000000&| @21
+|~+0#4040ff13&| @28
+|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@17
diff --git a/src/testdir/dumps/Test_prop_inserts_text_showbreak_18.dump b/src/testdir/dumps/Test_prop_inserts_text_showbreak_18.dump
new file mode 100644
index 0000000..c51a590
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_inserts_text_showbreak_18.dump
@@ -0,0 +1,6 @@
+| +0&#ffffff0@1|1| >1+0#e000e06&|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2
+| +0#0000000&@5|++0#4040ff13&|3+0#e000e06&|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1
+| +0#0000000&@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|a+0#0000000&| @1
+|~+0#4040ff13&| @28
+|~| @28
+|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@17
diff --git a/src/testdir/dumps/Test_prop_inserts_text_showbreak_19.dump b/src/testdir/dumps/Test_prop_inserts_text_showbreak_19.dump
new file mode 100644
index 0000000..e2d50a5
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_inserts_text_showbreak_19.dump
@@ -0,0 +1,6 @@
+| +0&#ffffff0@1|1| |1+0#e000e06&|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2
+| +0#0000000&@5|++0#4040ff13&|3+0#e000e06&|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1
+| +0#0000000&@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3>a+0#0000000&| @1
+|~+0#4040ff13&| @28
+|~| @28
+| +0#0000000&@29
diff --git a/src/testdir/dumps/Test_prop_inserts_text_showbreak_2.dump b/src/testdir/dumps/Test_prop_inserts_text_showbreak_2.dump
new file mode 100644
index 0000000..d7167c0
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_inserts_text_showbreak_2.dump
@@ -0,0 +1,6 @@
+| +0&#ffffff0@5|++0#4040ff13&|a+0#0000000&|1+0#e000e06&|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1
+| +0#0000000&@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3
+| +0#0000000&@5|++0#4040ff13&|1+0#e000e06&|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2
+| +0#0000000&@5|++0#4040ff13&|3+0#e000e06&>a+0#0000000&| @20
+|~+0#4040ff13&| @28
+|:+0#0000000&|s|e|t| |n|o|r|u|l|e|r| @17
diff --git a/src/testdir/dumps/Test_prop_inserts_text_showbreak_20.dump b/src/testdir/dumps/Test_prop_inserts_text_showbreak_20.dump
new file mode 100644
index 0000000..1e34f17
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_inserts_text_showbreak_20.dump
@@ -0,0 +1,6 @@
+| +0&#ffffff0@5|++0#4040ff13&|3+0#e000e06&|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1
+| +0#0000000&@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3>a+0#0000000&| @1
+|~+0#4040ff13&| @28
+|~| @28
+|~| @28
+| +0#0000000&@29
diff --git a/src/testdir/dumps/Test_prop_inserts_text_showbreak_21.dump b/src/testdir/dumps/Test_prop_inserts_text_showbreak_21.dump
new file mode 100644
index 0000000..24c6018
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_inserts_text_showbreak_21.dump
@@ -0,0 +1,6 @@
+| +0&#ffffff0@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3>a+0#0000000&| @1
+|~+0#4040ff13&| @28
+|~| @28
+|~| @28
+|~| @28
+| +0#0000000&@29
diff --git a/src/testdir/dumps/Test_prop_inserts_text_showbreak_3.dump b/src/testdir/dumps/Test_prop_inserts_text_showbreak_3.dump
new file mode 100644
index 0000000..8b4bee7
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_inserts_text_showbreak_3.dump
@@ -0,0 +1,6 @@
+| +0&#ffffff0@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3
+| +0#0000000&@5|++0#4040ff13&|1+0#e000e06&|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2
+| +0#0000000&@5|++0#4040ff13&|3+0#e000e06&>a+0#0000000&| @20
+|~+0#4040ff13&| @28
+|~| @28
+|:+0#0000000&|s|e|t| |n|o|r|u|l|e|r| @17
diff --git a/src/testdir/dumps/Test_prop_inserts_text_showbreak_4.dump b/src/testdir/dumps/Test_prop_inserts_text_showbreak_4.dump
new file mode 100644
index 0000000..9d477f2
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_inserts_text_showbreak_4.dump
@@ -0,0 +1,6 @@
+| +0&#ffffff0@5|++0#4040ff13&|1+0#e000e06&|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2
+| +0#0000000&@5|++0#4040ff13&|3+0#e000e06&>a+0#0000000&| @20
+|~+0#4040ff13&| @28
+|~| @28
+|~| @28
+|:+0#0000000&|s|e|t| |n|o|r|u|l|e|r| @17
diff --git a/src/testdir/dumps/Test_prop_inserts_text_showbreak_5.dump b/src/testdir/dumps/Test_prop_inserts_text_showbreak_5.dump
new file mode 100644
index 0000000..6e4b1b0
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_inserts_text_showbreak_5.dump
@@ -0,0 +1,6 @@
+| +0&#ffffff0@5|++0#4040ff13&|3+0#e000e06&>a+0#0000000&| @20
+|~+0#4040ff13&| @28
+|~| @28
+|~| @28
+|~| @28
+|:+0#0000000&|s|e|t| |n|o|r|u|l|e|r| @17
diff --git a/src/testdir/dumps/Test_prop_inserts_text_showbreak_6.dump b/src/testdir/dumps/Test_prop_inserts_text_showbreak_6.dump
new file mode 100644
index 0000000..756245e
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_inserts_text_showbreak_6.dump
@@ -0,0 +1,6 @@
+| +0&#ffffff0@1|1| |a@25
+| @5|++0#4040ff13&|a+0#0000000&>1+0#e000e06&|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1
+| +0#0000000&@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3
+| +0#0000000&@5|++0#4040ff13&|1+0#e000e06&|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2
+| +0#0000000&@5|++0#4040ff13&|3+0#e000e06&|a+0#0000000&| @20
+|-+2&&@1| |I|N|S|E|R|T| |-@1| +0&&@17
diff --git a/src/testdir/dumps/Test_prop_inserts_text_showbreak_7.dump b/src/testdir/dumps/Test_prop_inserts_text_showbreak_7.dump
new file mode 100644
index 0000000..70a6d7d
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_inserts_text_showbreak_7.dump
@@ -0,0 +1,6 @@
+| +0&#ffffff0@1|1| |a@25
+| @5|++0#4040ff13&>1+0#e000e06&|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2
+| +0#0000000&@5|++0#4040ff13&|3+0#e000e06&|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1
+| +0#0000000&@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3
+| +0#0000000&@5|++0#4040ff13&|a+0#0000000&| @21
+|-+2&&@1| |I|N|S|E|R|T| |-@1| +0&&@17
diff --git a/src/testdir/dumps/Test_prop_inserts_text_showbreak_8.dump b/src/testdir/dumps/Test_prop_inserts_text_showbreak_8.dump
new file mode 100644
index 0000000..107a374
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_inserts_text_showbreak_8.dump
@@ -0,0 +1,6 @@
+| +0&#ffffff0@1|1| |a@25
+| @5|++0#4040ff13&|1+0#e000e06&|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2
+| +0#0000000&@5|++0#4040ff13&|3+0#e000e06&|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1
+| +0#0000000&@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3
+| +0#0000000&@5|++0#4040ff13&>a+0#0000000&| @21
+@30
diff --git a/src/testdir/dumps/Test_prop_inserts_text_showbreak_9.dump b/src/testdir/dumps/Test_prop_inserts_text_showbreak_9.dump
new file mode 100644
index 0000000..65cab33
--- /dev/null
+++ b/src/testdir/dumps/Test_prop_inserts_text_showbreak_9.dump
@@ -0,0 +1,6 @@
+| +0&#ffffff0@5|++0#4040ff13&|1+0#e000e06&|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2
+| +0#0000000&@5|++0#4040ff13&|3+0#e000e06&|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1
+| +0#0000000&@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3
+| +0#0000000&@5|++0#4040ff13&>a+0#0000000&| @21
+|~+0#4040ff13&| @28
+| +0#0000000&@29
diff --git a/src/testdir/test_listlbr.vim b/src/testdir/test_listlbr.vim
index 198ad8c..e583e48 100644
--- a/src/testdir/test_listlbr.vim
+++ b/src/testdir/test_listlbr.vim
@@ -15,7 +15,7 @@
endfunction
func s:compare_lines(expect, actual)
- call assert_equal(join(a:expect, "\n"), join(a:actual, "\n"))
+ call assert_equal(a:expect, a:actual)
endfunc
function s:test_windows(...)
@@ -331,4 +331,45 @@
call s:close_windows()
endfunc
+func Test_ctrl_char_on_wrap_column()
+ call s:test_windows("setl nolbr wrap sbr=")
+ call setline(1, 'aaa' .. repeat("\<C-A>", 150) .. 'bbb')
+ call cursor(1,1)
+ norm! $
+ redraw!
+ let expect=[
+\ '<<<^A^A^A^A^A^A^A^A^',
+\ 'A^A^A^A^A^A^A^A^A^A^',
+\ 'A^A^A^A^A^A^A^A^A^A^',
+\ 'A^A^A^A^A^A^A^A^A^A^',
+\ 'A^A^A^A^A^A^A^A^A^A^',
+\ 'A^A^A^A^A^A^A^A^A^A^',
+\ 'A^A^A^A^A^A^A^A^A^A^',
+\ 'A^A^A^A^A^A^A^A^A^A^',
+\ 'A^A^A^A^A^A^A^A^A^A^',
+\ 'A^Abbb ']
+ let lines = s:screen_lines([1, 10], winwidth(0))
+ call s:compare_lines(expect, lines)
+ call assert_equal(len(expect), winline())
+ call assert_equal(strwidth(trim(expect[-1], ' ', 2)), wincol())
+ setl sbr=!!
+ redraw!
+ let expect=[
+\ '!!A^A^A^A^A^A^A^A^A^',
+\ '!!A^A^A^A^A^A^A^A^A^',
+\ '!!A^A^A^A^A^A^A^A^A^',
+\ '!!A^A^A^A^A^A^A^A^A^',
+\ '!!A^A^A^A^A^A^A^A^A^',
+\ '!!A^A^A^A^A^A^A^A^A^',
+\ '!!A^A^A^A^A^A^A^A^A^',
+\ '!!A^A^A^A^A^A^A^A^A^',
+\ '!!A^A^A^A^A^A^A^A^A^',
+\ '!!A^A^A^A^A^A^Abbb ']
+ let lines = s:screen_lines([1, 10], winwidth(0))
+ call s:compare_lines(expect, lines)
+ call assert_equal(len(expect), winline())
+ call assert_equal(strwidth(trim(expect[-1], ' ', 2)), wincol())
+ call s:close_windows()
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testdir/test_listlbr_utf8.vim b/src/testdir/test_listlbr_utf8.vim
index ec54209..1bbbd2d 100644
--- a/src/testdir/test_listlbr_utf8.vim
+++ b/src/testdir/test_listlbr_utf8.vim
@@ -249,7 +249,6 @@
func Test_chinese_char_on_wrap_column()
call s:test_windows("setl nolbr wrap sbr=")
- syntax off
call setline(1, [
\ 'aaaaaaaaaaaaaaaaaaa中'.
\ 'aaaaaaaaaaaaaaaaa中'.
@@ -278,6 +277,84 @@
\ '中hello ']
let lines = s:screen_lines([1, 10], winwidth(0))
call s:compare_lines(expect, lines)
+ call assert_equal(len(expect), winline())
+ call assert_equal(strwidth(trim(expect[-1], ' ', 2)), wincol())
+ call s:close_windows()
+endfunc
+
+func Test_chinese_char_on_wrap_column_sbr()
+ call s:test_windows("setl nolbr wrap sbr=!!!")
+ call setline(1, [
+\ 'aaaaaaaaaaaaaaaaaaa中'.
+\ 'aaaaaaaaaaaaaa中'.
+\ 'aaaaaaaaaaaaaa中'.
+\ 'aaaaaaaaaaaaaa中'.
+\ 'aaaaaaaaaaaaaa中'.
+\ 'aaaaaaaaaaaaaa中'.
+\ 'aaaaaaaaaaaaaa中'.
+\ 'aaaaaaaaaaaaaa中'.
+\ 'aaaaaaaaaaaaaa中'.
+\ 'aaaaaaaaaaaaaa中'.
+\ 'hello'])
+ call cursor(1,1)
+ norm! $
+ redraw!
+ let expect=[
+\ '!!!中aaaaaaaaaaaaaa>',
+\ '!!!中aaaaaaaaaaaaaa>',
+\ '!!!中aaaaaaaaaaaaaa>',
+\ '!!!中aaaaaaaaaaaaaa>',
+\ '!!!中aaaaaaaaaaaaaa>',
+\ '!!!中aaaaaaaaaaaaaa>',
+\ '!!!中aaaaaaaaaaaaaa>',
+\ '!!!中aaaaaaaaaaaaaa>',
+\ '!!!中aaaaaaaaaaaaaa>',
+\ '!!!中hello ']
+ let lines = s:screen_lines([1, 10], winwidth(0))
+ call s:compare_lines(expect, lines)
+ call assert_equal(len(expect), winline())
+ call assert_equal(strwidth(trim(expect[-1], ' ', 2)), wincol())
+ call s:close_windows()
+endfunc
+
+func Test_unprintable_char_on_wrap_column()
+ call s:test_windows("setl nolbr wrap sbr=")
+ call setline(1, 'aaa' .. repeat("\uFEFF", 50) .. 'bbb')
+ call cursor(1,1)
+ norm! $
+ redraw!
+ let expect=[
+\ '<<<<feff><feff><feff',
+\ '><feff><feff><feff><',
+\ 'feff><feff><feff><fe',
+\ 'ff><feff><feff><feff',
+\ '><feff><feff><feff><',
+\ 'feff><feff><feff><fe',
+\ 'ff><feff><feff><feff',
+\ '><feff><feff><feff><',
+\ 'feff><feff><feff><fe',
+\ 'ff>bbb ']
+ let lines = s:screen_lines([1, 10], winwidth(0))
+ call s:compare_lines(expect, lines)
+ call assert_equal(len(expect), winline())
+ call assert_equal(strwidth(trim(expect[-1], ' ', 2)), wincol())
+ setl sbr=!!
+ redraw!
+ let expect=[
+\ '!!><feff><feff><feff',
+\ '!!><feff><feff><feff',
+\ '!!><feff><feff><feff',
+\ '!!><feff><feff><feff',
+\ '!!><feff><feff><feff',
+\ '!!><feff><feff><feff',
+\ '!!><feff><feff><feff',
+\ '!!><feff><feff><feff',
+\ '!!><feff><feff><feff',
+\ '!!><feff><feff>bbb ']
+ let lines = s:screen_lines([1, 10], winwidth(0))
+ call s:compare_lines(expect, lines)
+ call assert_equal(len(expect), winline())
+ call assert_equal(strwidth(trim(expect[-1], ' ', 2)), wincol())
call s:close_windows()
endfunc
diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim
index e7e9eec..c272f2e 100644
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -2630,6 +2630,110 @@
call StopVimInTerminal(buf)
endfunc
+func Run_test_prop_inserts_text_showbreak(cmd)
+ CheckRunVimInTerminal
+
+ let lines =<< trim END
+ highlight! link LineNr Normal
+ call setline(1, repeat('a', 28))
+ call prop_type_add('theprop', #{highlight: 'Special'})
+ call prop_add(1, 28, #{type: 'theprop', text: repeat('123', 23), text_wrap: 'wrap'})
+ setlocal number showbreak=+ breakindent breakindentopt=shift:2
+ setlocal scrolloff=0 smoothscroll
+ normal! $
+ END
+ let lines = insert(lines, a:cmd)
+ call writefile(lines, 'XscriptPropsShowbreak', 'D')
+ let buf = RunVimInTerminal('-S XscriptPropsShowbreak', #{rows: 6, cols: 30})
+ call term_sendkeys(buf, ":set noruler\<CR>")
+ call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_1', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_2', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_3', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_4', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_5', {})
+ call term_sendkeys(buf, "zbi")
+ call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_6', {})
+ call term_sendkeys(buf, "\<BS>")
+ call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_7', {})
+ call term_sendkeys(buf, "\<Esc>l")
+ call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_8', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_9', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_10', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_11', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_12', {})
+ call term_sendkeys(buf, "023x$")
+ call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_13', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_14', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_15', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_16', {})
+ call term_sendkeys(buf, "zbi")
+ call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_17', {})
+ call term_sendkeys(buf, "\<C-U>")
+ call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_18', {})
+ call term_sendkeys(buf, "\<Esc>")
+ call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_19', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_20', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_21', {})
+
+ call StopVimInTerminal(buf)
+endfunc
+
+func Test_prop_inserts_text_showbreak()
+ call Run_test_prop_inserts_text_showbreak('')
+ " because of 'breakindent' the screendumps are the same
+ call Run_test_prop_inserts_text_showbreak('set cpoptions+=n')
+endfunc
+
+func Test_prop_before_tab_skipcol()
+ CheckRunVimInTerminal
+
+ let lines =<< trim END
+ call setline(1, repeat("\t", 4) .. 'a')
+ call prop_type_add('theprop', #{highlight: 'Special'})
+ call prop_add(1, 4, #{type: 'theprop', text: repeat('12', 32), text_wrap: 'wrap'})
+ setlocal list listchars=tab:<-> scrolloff=0 smoothscroll
+ normal! $
+ END
+ call writefile(lines, 'XscriptPropsBeforeTabSkipcol', 'D')
+ let buf = RunVimInTerminal('-S XscriptPropsBeforeTabSkipcol', #{rows: 6, cols: 30})
+ call VerifyScreenDump(buf, 'Test_prop_before_tab_skipcol_1', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_prop_before_tab_skipcol_2', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_prop_before_tab_skipcol_3', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_prop_before_tab_skipcol_4', {})
+ call term_sendkeys(buf, "zbh")
+ call VerifyScreenDump(buf, 'Test_prop_before_tab_skipcol_5', {})
+ call term_sendkeys(buf, "i")
+ call VerifyScreenDump(buf, 'Test_prop_before_tab_skipcol_6', {})
+ call term_sendkeys(buf, "\<C-O>:setlocal nolist\<CR>")
+ call VerifyScreenDump(buf, 'Test_prop_before_tab_skipcol_7', {})
+ call term_sendkeys(buf, "\<Esc>l")
+ call VerifyScreenDump(buf, 'Test_prop_before_tab_skipcol_8', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_prop_before_tab_skipcol_9', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_prop_before_tab_skipcol_10', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_prop_before_tab_skipcol_11', {})
+
+ call StopVimInTerminal(buf)
+endfunc
+
func Test_prop_add_with_text_fails()
call prop_type_add('failing', #{highlight: 'ErrorMsg'})
call assert_fails("call prop_add(1, 0, #{type: 'failing', text: 'X', end_lnum: 1})", 'E1305:')