diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-01-27 14:15:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-27 14:15:08 +0100 |
commit | 8171e96b9640c54eb67a8e5d1082f1fd6e794f23 (patch) | |
tree | 7ef2ee67b4328b7e5478a74bfccc6d5ec6eb8d38 /src/nvim/misc1.c | |
parent | f2398a766e094d74ab19f3037872abbc97c16728 (diff) | |
parent | de16c0bf6445f92f2b6e92ba3253d581e5562178 (diff) | |
download | rneovim-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/misc1.c')
-rw-r--r-- | src/nvim/misc1.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/misc1.c b/src/nvim/misc1.c index a66ded13f1..7f19bdf145 100644 --- a/src/nvim/misc1.c +++ b/src/nvim/misc1.c @@ -1251,7 +1251,7 @@ int plines_win_nofill( return 1; } - if (wp->w_grid.Columns == 0) { + if (wp->w_width_inner == 0) { return 1; } @@ -1261,8 +1261,8 @@ int plines_win_nofill( } const int lines = plines_win_nofold(wp, lnum); - if (winheight && lines > wp->w_grid.Rows) { - return wp->w_grid.Rows; + if (winheight && lines > wp->w_height_inner) { + return wp->w_height_inner; } return lines; } @@ -1292,7 +1292,7 @@ int plines_win_nofold(win_T *wp, linenr_T lnum) /* * Add column offset for 'number', 'relativenumber' and 'foldcolumn'. */ - width = wp->w_grid.Columns - win_col_off(wp); + width = wp->w_width_inner - win_col_off(wp); if (width <= 0 || col > 32000) { return 32000; // bigger than the number of screen columns } @@ -1318,7 +1318,7 @@ int plines_win_col(win_T *wp, linenr_T lnum, long column) if (!wp->w_p_wrap) return lines + 1; - if (wp->w_grid.Columns == 0) { + if (wp->w_width_inner == 0) { return lines + 1; } @@ -1341,7 +1341,7 @@ int plines_win_col(win_T *wp, linenr_T lnum, long column) } // Add column offset for 'number', 'relativenumber', 'foldcolumn', etc. - int width = wp->w_grid.Columns - win_col_off(wp); + int width = wp->w_width_inner - win_col_off(wp); if (width <= 0) { return 9999; } |