summaryrefslogtreecommitdiff
path: root/src/sign.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-08-21 13:20:29 +0200
committerBram Moolenaar <Bram@vim.org>2019-08-21 13:20:29 +0200
commit42aff46d9783d6c80519a35350065c34372fbf70 (patch)
tree3830f4ee2333d0958da5e410dd3bd8227e21253c /src/sign.c
parent4dc8f498aa3b1f58301914b57d75fea1dcad33ef (diff)
downloadvim-git-42aff46d9783d6c80519a35350065c34372fbf70.tar.gz
patch 8.1.1899: sign_place() does not work as documentedv8.1.1899
Problem: sign_place() does not work as documented. Solution: Make accept line numbers like line(). (Yegappan Lakshmanan, closes #4848)
Diffstat (limited to 'src/sign.c')
-rw-r--r--src/sign.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/sign.c b/src/sign.c
index 7628fcefd..73951317e 100644
--- a/src/sign.c
+++ b/src/sign.c
@@ -2430,9 +2430,12 @@ sign_place_from_dict(
di = dict_find(dict, (char_u *)"lnum", -1);
if (di != NULL)
{
- lnum = (int)tv_get_number_chk(&di->di_tv, &notanum);
- if (notanum)
+ lnum = tv_get_lnum(&di->di_tv);
+ if (lnum <= 0)
+ {
+ emsg(_(e_invarg));
goto cleanup;
+ }
}
// sign priority