summaryrefslogtreecommitdiffstats
path: root/src/textprop.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-09-17 18:57:36 +0100
committerBram Moolenaar <Bram@vim.org>2022-09-17 18:57:36 +0100
commitfb593c5350e8fe23b608ded5a011cd7eefe73922 (patch)
treebace58f143d5885df770e894b46fe9a95c8137d7 /src/textprop.c
parent4c7fd4d68f69b4e420a5448f144f4d57eda22f8c (diff)
patch 9.0.0489: using "end_lnum" with virtual text causes problemsv9.0.0489
Problem: Using "end_lnum" with virtual text causes problems. Solution: Disallow using "end_lnum" with virtual text. (closes #11151) Also disallow "end_col" and "length".
Diffstat (limited to 'src/textprop.c')
-rw-r--r--src/textprop.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/textprop.c b/src/textprop.c
index 6e5c1447ff..4153e3f453 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -488,6 +488,14 @@ prop_add_common(
if (dict_has_key(dict, "text"))
{
+ if (dict_has_key(dict, "length")
+ || dict_has_key(dict, "end_col")
+ || dict_has_key(dict, "end_lnum"))
+ {
+ emsg(_(e_cannot_use_length_endcol_and_endlnum_with_text));
+ goto theend;
+ }
+
text = dict_get_string(dict, "text", TRUE);
if (text == NULL)
goto theend;