aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
authorUtkarsh Maheshwari <utkarshme96@gmail.com>2018-06-06 02:59:11 +0530
committerBjörn Linse <bjorn.linse@gmail.com>2018-12-31 12:44:21 +0100
commit01555de2da79eaf6e569e5e6ee7244dbf5f709e5 (patch)
treec4cf93ea7ff63b6282d6ab596d6a155a43f9596f /src/nvim/window.c
parentf102f50ebeca98365b308463c25eb2caffffba51 (diff)
downloadrneovim-01555de2da79eaf6e569e5e6ee7244dbf5f709e5.tar.gz
rneovim-01555de2da79eaf6e569e5e6ee7244dbf5f709e5.tar.bz2
rneovim-01555de2da79eaf6e569e5e6ee7244dbf5f709e5.zip
multigrid: Allow UIs to set grid size different from window size
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r--src/nvim/window.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index 4d2b238b7a..5153bfadda 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -3860,6 +3860,8 @@ static win_T *win_alloc(win_T *after, int hidden)
new_wp->handle = ++last_win_id;
handle_register_window(new_wp);
+ grid_assign_handle(&new_wp->w_grid);
+
// Init w: variables.
new_wp->w_vars = tv_dict_alloc();
init_var_dict(new_wp->w_vars, &new_wp->w_winvar, VAR_SCOPE);
@@ -4087,8 +4089,8 @@ static void frame_remove(frame_T *frp)
void win_alloc_lines(win_T *wp)
{
wp->w_lines_valid = 0;
- assert(Rows >= 0);
- wp->w_lines = xcalloc(Rows, sizeof(wline_T));
+ assert(wp->w_grid.Rows >= 0);
+ wp->w_lines = xcalloc(wp->w_grid.Rows + 1, sizeof(wline_T));
}
/*