aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ui.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/ui.c')
-rw-r--r--src/nvim/ui.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/nvim/ui.c b/src/nvim/ui.c
index 24557c5d0b..74814bf0ae 100644
--- a/src/nvim/ui.c
+++ b/src/nvim/ui.c
@@ -440,13 +440,16 @@ Array ui_array(void)
return all_uis;
}
-void ui_grid_resize(GridHandle grid_handle, int width, int height)
+void ui_grid_resize(GridHandle grid_handle, int width, int height, Error *error)
{
- win_T *wp = get_win_by_grid_handle(grid_handle);
+ if (grid_handle == DEFAULT_GRID_HANDLE) {
+ screen_resize(width, height);
+ return;
+ }
+ win_T *wp = get_win_by_grid_handle(grid_handle);
if (wp == NULL) {
- //TODO(utkarshme): error out
- abort();
+ api_set_error(error, kErrorTypeValidation, "No window with the given handle");
return;
}