comparison src/sign.c @ 17805:313f498c646e v8.1.1899

patch 8.1.1899: sign_place() does not work as documented Commit: https://github.com/vim/vim/commit/42aff46d9783d6c80519a35350065c34372fbf70 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Aug 21 13:20:29 2019 +0200 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)
author Bram Moolenaar <Bram@vim.org>
date Wed, 21 Aug 2019 13:30:03 +0200
parents 04245f071792
children 1848b3e07266
comparison
equal deleted inserted replaced
17804:5f09328ccc88 17805:313f498c646e
2428 2428
2429 // line number of the sign 2429 // line number of the sign
2430 di = dict_find(dict, (char_u *)"lnum", -1); 2430 di = dict_find(dict, (char_u *)"lnum", -1);
2431 if (di != NULL) 2431 if (di != NULL)
2432 { 2432 {
2433 lnum = (int)tv_get_number_chk(&di->di_tv, &notanum); 2433 lnum = tv_get_lnum(&di->di_tv);
2434 if (notanum) 2434 if (lnum <= 0)
2435 {
2436 emsg(_(e_invarg));
2435 goto cleanup; 2437 goto cleanup;
2438 }
2436 } 2439 }
2437 2440
2438 // sign priority 2441 // sign priority
2439 di = dict_find(dict, (char_u *)"priority", -1); 2442 di = dict_find(dict, (char_u *)"priority", -1);
2440 if (di != NULL) 2443 if (di != NULL)