aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/indent.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2019-01-25 18:44:29 +0100
committerBjörn Linse <bjorn.linse@gmail.com>2019-01-27 12:07:06 +0100
commit2ab70cb55c80b17fb4100dd7f2d056131c02b08b (patch)
treee3a4cc06776b51d1ec4e9733d377452d0158b4c3 /src/nvim/indent.c
parent80b75bc99aeb6ecc40e59343ec527443d882e8ec (diff)
downloadrneovim-2ab70cb55c80b17fb4100dd7f2d056131c02b08b.tar.gz
rneovim-2ab70cb55c80b17fb4100dd7f2d056131c02b08b.tar.bz2
rneovim-2ab70cb55c80b17fb4100dd7f2d056131c02b08b.zip
window/ui: reorganize size variables, fix terminal window size with multigrid.
wp->w_height_inner now contains the "inner" size, regardless if the window has been drawn yet or not. It should be used instead of wp->w_grid.Rows, for stuff that is not directly related to accessing the allocated grid memory, such like cursor movement and terminal size
Diffstat (limited to 'src/nvim/indent.c')
-rw-r--r--src/nvim/indent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/indent.c b/src/nvim/indent.c
index 19456da45c..9305e85f38 100644
--- a/src/nvim/indent.c
+++ b/src/nvim/indent.c
@@ -473,7 +473,7 @@ int get_breakindent_win(win_T *wp, char_u *line)
static varnumber_T prev_tick = 0; // Changedtick of cached value.
int bri = 0;
// window width minus window margin space, i.e. what rests for text
- const int eff_wwidth = wp->w_grid.Columns
+ const int eff_wwidth = wp->w_width_inner
- ((wp->w_p_nu || wp->w_p_rnu)
&& (vim_strchr(p_cpo, CPO_NUMCOL) == NULL)
? number_width(wp) + 1 : 0);