mirror of
https://github.com/neovim/neovim.git
synced 2025-09-13 14:58:18 +00:00
Use PRId64 to format Integer when calling api_set_error
Integer is a 64-bit type so using %d can produce incorrect results. test/functional/api/highlight_spec.lua @ 35: highlight api nvim_get_hl_by_id ...W7Xi/neovim-0.2.1/test/functional/api/highlight_spec.lua:46: Expected objects to be the same. Passed in: (string) 'Invalid highlight id: 7671724' Expected: (string) 'Invalid highlight id: 30000'
This commit is contained in:
@@ -8256,7 +8256,7 @@ Dictionary hl_get_attr_by_id(Integer attr_id, Boolean rgb, Error *err)
|
||||
attrentry_T *aep = syn_cterm_attr2entry((int)attr_id);
|
||||
if (!aep) {
|
||||
api_set_error(err, kErrorTypeException,
|
||||
"Invalid attribute id: %d", attr_id);
|
||||
"Invalid attribute id: %" PRId64, attr_id);
|
||||
return dic;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user