vim-patch:8.1.1899: sign_place() does not work as documented

Problem:    sign_place() does not work as documented.
Solution:   Make accept line numbers like line(). (Yegappan Lakshmanan,
            closes #4848)
This commit is contained in:
Lewis Russell
2021-03-12 00:07:49 +00:00
parent 5257bce979
commit d82b599ea5
2 changed files with 14 additions and 5 deletions

View File

@@ -2033,8 +2033,9 @@ int sign_place_from_dict(
// line number of the sign
di = tv_dict_find(dict, "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;
}
}