mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 15:21:47 +00:00
refactor(api): VALIDATE macros #22256
- VALIDATE() takes a format string - deduplicate check_string_array - VALIDATE_RANGE - validate UI args
This commit is contained in:
@@ -821,8 +821,7 @@ int object_to_hl_id(Object obj, const char *what, Error *err)
|
||||
} else if (obj.type == kObjectTypeInteger) {
|
||||
return MAX((int)obj.data.integer, 0);
|
||||
} else {
|
||||
api_set_error(err, kErrorTypeValidation,
|
||||
"%s is not a valid highlight", what);
|
||||
api_set_error(err, kErrorTypeValidation, "Invalid highlight: %s", what);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user