aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/edit.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2019-01-27 14:15:08 +0100
committerGitHub <noreply@github.com>2019-01-27 14:15:08 +0100
commit8171e96b9640c54eb67a8e5d1082f1fd6e794f23 (patch)
tree7ef2ee67b4328b7e5478a74bfccc6d5ec6eb8d38 /src/nvim/edit.c
parentf2398a766e094d74ab19f3037872abbc97c16728 (diff)
parentde16c0bf6445f92f2b6e92ba3253d581e5562178 (diff)
downloadrneovim-8171e96b9640c54eb67a8e5d1082f1fd6e794f23.tar.gz
rneovim-8171e96b9640c54eb67a8e5d1082f1fd6e794f23.tar.bz2
rneovim-8171e96b9640c54eb67a8e5d1082f1fd6e794f23.zip
Merge pull request #9551 from bfredl/multiterm
Fix :terminal resizing, and some multigrid size cleanup
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r--src/nvim/edit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index 90507cd0a5..bb16e2ae4d 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -566,7 +566,7 @@ static int insert_check(VimState *state)
if (curwin->w_wcol < s->mincol - curbuf->b_p_ts
&& curwin->w_wrow == curwin->w_winrow
- + curwin->w_grid.Rows - 1 - p_so
+ + curwin->w_height_inner - 1 - p_so
&& (curwin->w_cursor.lnum != curwin->w_topline
|| curwin->w_topfill > 0)) {
if (curwin->w_topfill > 0) {
@@ -5868,7 +5868,7 @@ static void check_auto_format(
/*
* Find out textwidth to be used for formatting:
* if 'textwidth' option is set, use it
- * else if 'wrapmargin' option is set, use curwin->w_grid.Columns-'wrapmargin'
+ * else if 'wrapmargin' option is set, use curwin->w_width_inner-'wrapmargin'
* if invalid value, use 0.
* Set default to window width (maximum 79) for "gq" operator.
*/
@@ -5883,7 +5883,7 @@ comp_textwidth (
if (textwidth == 0 && curbuf->b_p_wm) {
/* The width is the window width minus 'wrapmargin' minus all the
* things that add to the margin. */
- textwidth = curwin->w_grid.Columns - curbuf->b_p_wm;
+ textwidth = curwin->w_width_inner - curbuf->b_p_wm;
if (cmdwin_type != 0) {
textwidth -= 1;
}
@@ -5899,7 +5899,7 @@ comp_textwidth (
if (textwidth < 0)
textwidth = 0;
if (ff && textwidth == 0) {
- textwidth = curwin->w_grid.Columns - 1;
+ textwidth = curwin->w_width_inner - 1;
if (textwidth > 79) {
textwidth = 79;
}