summaryrefslogtreecommitdiff
path: root/src/charset.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-12-19 13:31:06 +0000
committerBram Moolenaar <Bram@vim.org>2022-12-19 13:31:06 +0000
commit4ce1f99a2d58b809ab5a5c602bd031426f8527e8 (patch)
tree557dfdf60433feee20ea24ae7fc8fbde67e26c59 /src/charset.c
parent8efdcee02ed02cf9e51e1757441715c2479757ee (diff)
downloadvim-git-4ce1f99a2d58b809ab5a5c602bd031426f8527e8.tar.gz
patch 9.0.1077: can add text property with negative ID before virtual textv9.0.1077
Problem: Can add text property with negative ID before virtual text property. Solution: Remember that a text property with a negative ID was used and give an appropriate error message. (closes #11725) Fix index computation.
Diffstat (limited to 'src/charset.c')
-rw-r--r--src/charset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/charset.c b/src/charset.c
index d9609f4f4..8d7b61a4a 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -1181,7 +1181,7 @@ win_lbr_chartabsize(
? col == 0
: (s[0] == NUL || s[1] == NUL)
&& cts->cts_with_trailing)))
- && tp->tp_id - 1 < gap->ga_len)
+ && -tp->tp_id - 1 < gap->ga_len)
{
char_u *p = ((char_u **)gap->ga_data)[-tp->tp_id - 1];