aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/grid_defs.h
diff options
context:
space:
mode:
authorchentau <tchen1998@gmail.com>2021-03-02 22:44:44 -0800
committerchentau <tchen1998@gmail.com>2021-03-11 12:27:29 -0800
commit8fe19d9d89d90eed347d9bfeb99446c0f400cca1 (patch)
tree6360de1b9470da990d094d441845753e1b89398d /src/nvim/grid_defs.h
parentc50b737d6f953e1c4240c2e24693ce49932cdaf6 (diff)
downloadrneovim-8fe19d9d89d90eed347d9bfeb99446c0f400cca1.tar.gz
rneovim-8fe19d9d89d90eed347d9bfeb99446c0f400cca1.tar.bz2
rneovim-8fe19d9d89d90eed347d9bfeb99446c0f400cca1.zip
screen: make ui_compositor aware of the intended size of a float
Diffstat (limited to 'src/nvim/grid_defs.h')
-rw-r--r--src/nvim/grid_defs.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/nvim/grid_defs.h b/src/nvim/grid_defs.h
index e14aae73d8..752be4f5a8 100644
--- a/src/nvim/grid_defs.h
+++ b/src/nvim/grid_defs.h
@@ -76,6 +76,12 @@ typedef struct {
int comp_row;
int comp_col;
+ // Requested width and height of the grid upon resize. Used by
+ // `ui_compositor` to correctly determine which regions need to
+ // be redrawn.
+ int comp_width;
+ int comp_height;
+
// z-index of the grid. Grids with higher index is draw on top.
// default_grid.comp_index is always zero.
size_t comp_index;
@@ -86,6 +92,6 @@ typedef struct {
} ScreenGrid;
#define SCREEN_GRID_INIT { 0, NULL, NULL, NULL, NULL, NULL, 0, 0, false, \
- false, 0, 0, false, true, 0, 0, 0, false }
+ false, 0, 0, false, true, 0, 0, 0, 0, 0, false }
#endif // NVIM_GRID_DEFS_H