mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 09:18:19 +00:00
api_set_error(): rename
This commit is contained in:
@@ -64,7 +64,7 @@ void nvim_win_set_cursor(Window window, ArrayOf(Integer, 2) pos, Error *err)
|
||||
|
||||
if (pos.size != 2 || pos.items[0].type != kObjectTypeInteger
|
||||
|| pos.items[1].type != kObjectTypeInteger) {
|
||||
_api_set_error(err,
|
||||
api_set_error(err,
|
||||
kErrorTypeValidation,
|
||||
_("Argument \"pos\" must be a [row, col] array"));
|
||||
return;
|
||||
@@ -78,12 +78,12 @@ void nvim_win_set_cursor(Window window, ArrayOf(Integer, 2) pos, Error *err)
|
||||
int64_t col = pos.items[1].data.integer;
|
||||
|
||||
if (row <= 0 || row > win->w_buffer->b_ml.ml_line_count) {
|
||||
_api_set_error(err, kErrorTypeValidation, _("Cursor position outside buffer"));
|
||||
api_set_error(err, kErrorTypeValidation, _("Cursor position outside buffer"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (col > MAXCOL || col < 0) {
|
||||
_api_set_error(err, kErrorTypeValidation, _("Column value outside range"));
|
||||
api_set_error(err, kErrorTypeValidation, _("Column value outside range"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ void nvim_win_set_height(Window window, Integer height, Error *err)
|
||||
}
|
||||
|
||||
if (height > INT_MAX || height < INT_MIN) {
|
||||
_api_set_error(err, kErrorTypeValidation, _("Height value outside range"));
|
||||
api_set_error(err, kErrorTypeValidation, _("Height value outside range"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ void nvim_win_set_width(Window window, Integer width, Error *err)
|
||||
}
|
||||
|
||||
if (width > INT_MAX || width < INT_MIN) {
|
||||
_api_set_error(err, kErrorTypeValidation, _("Width value outside range"));
|
||||
api_set_error(err, kErrorTypeValidation, _("Width value outside range"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user