summaryrefslogtreecommitdiff
path: root/src/textprop.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-07-31 18:33:57 +0200
committerBram Moolenaar <Bram@vim.org>2021-07-31 18:33:57 +0200
commit8e3fc135e884a30620fb1c6e84986fae1467acd3 (patch)
treeaee5f877c6359bf1971a2dc2d03abf3be6c77dd7 /src/textprop.c
parentbf634a0a8b64fda2e53d3e2254fe0ffdc3d67196 (diff)
downloadvim-git-8e3fc135e884a30620fb1c6e84986fae1467acd3.tar.gz
patch 8.2.3257: calling prop_find() with -1 for ID gives errornous errorv8.2.3257
Problem: Calling prop_find() with -1 for ID gives errornous error. (Naohiro Ono) Solution: When passing -1 use -2. (closes #8674)
Diffstat (limited to 'src/textprop.c')
-rw-r--r--src/textprop.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/textprop.c b/src/textprop.c
index 92dc645b0..bc27aef6e 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -686,7 +686,11 @@ f_prop_find(typval_T *argvars, typval_T *rettv)
skipstart = dict_get_bool(dict, (char_u *)"skipstart", 0);
if (dict_find(dict, (char_u *)"id", -1) != NULL)
+ {
id = dict_get_number(dict, (char_u *)"id");
+ if (id == -1)
+ id = -2;
+ }
if (dict_find(dict, (char_u *)"type", -1))
{
char_u *name = dict_get_string(dict, (char_u *)"type", FALSE);