mirror of
https://github.com/neovim/neovim.git
synced 2025-12-10 00:22:41 +00:00
vim-patch:8.1.0644: finding next sign ID is inefficient
Problem: Finding next sign ID is inefficient.
Solution: Add next_sign_id. (Yegappan Lakshmanan, closes vim/vim#3717)
6436cd83f9
This commit is contained in:
@@ -9294,7 +9294,7 @@ static list_T *get_buffer_signs(buf_T *buf)
|
||||
dict_T *d;
|
||||
list_T *const l = tv_list_alloc(kListLenMayKnow);
|
||||
|
||||
FOR_ALL_SIGNS_IN_BUF(buf) {
|
||||
FOR_ALL_SIGNS_IN_BUF(buf, sign) {
|
||||
if ((d = sign_get_info(sign)) != NULL) {
|
||||
tv_list_append_dict(l, d);
|
||||
}
|
||||
@@ -15558,6 +15558,8 @@ f_sign_getplaced(typval_T *argvars, typval_T *rettv)
|
||||
group = tv_get_string_chk(&di->di_tv);
|
||||
if (group == NULL)
|
||||
return;
|
||||
if (*group == '\0') // empty string means global group
|
||||
group = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user