mirror of
https://github.com/neovim/neovim.git
synced 2025-10-14 22:06:07 +00:00
api: handle null string in buffer_add_highlight
This commit is contained in:
@@ -691,7 +691,7 @@ Integer buffer_add_highlight(Buffer buffer,
|
||||
col_end = MAXCOL;
|
||||
}
|
||||
|
||||
int hlg_id = syn_name2id((char_u*)hl_group.data);
|
||||
int hlg_id = syn_name2id((char_u *)(hl_group.data ? hl_group.data : ""));
|
||||
src_id = bufhl_add_hl(buf, (int)src_id, hlg_id, (linenr_T)line+1,
|
||||
(colnr_T)col_start+1, (colnr_T)col_end);
|
||||
return src_id;
|
||||
|
Reference in New Issue
Block a user