summaryrefslogtreecommitdiffstats
path: root/src/textprop.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-08-10 19:50:47 +0100
committerBram Moolenaar <Bram@vim.org>2022-08-10 19:50:47 +0100
commit82b14c143aa1e70d55509cc9fa408828e90c93de (patch)
treedd5bd96742192f37f63c4aafdcfb05685009702d /src/textprop.c
parent96bde99bf890acd9952863a02c1d15edca2000e1 (diff)
patch 9.0.0188: strange effects when using "text_align" with non-zero columnv9.0.0188
Problem: Strange effects when using virtual text with "text_align" and non-zero column. (Martin Tournoij) Solution: Give an error. (closes #10888)
Diffstat (limited to 'src/textprop.c')
-rw-r--r--src/textprop.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/textprop.c b/src/textprop.c
index 45023e88d5..f33edc2117 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -488,6 +488,11 @@ prop_add_common(
if (p == NULL)
goto theend;
+ if (start_col != 0)
+ {
+ emsg(_(e_can_only_use_text_align_when_column_is_zero));
+ goto theend;
+ }
if (STRCMP(p, "right") == 0)
flags |= TP_FLAG_ALIGN_RIGHT;
else if (STRCMP(p, "below") == 0)