aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_docmd.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2019-07-08 19:50:43 +0200
committerGitHub <noreply@github.com>2019-07-08 19:50:43 +0200
commit42bdccdf6c36576a080becc8b68993af7c855aa6 (patch)
tree58692f0edf7783911f4e9620cd5065c6cc89abfa /src/nvim/ex_docmd.c
parentc07f266c5bc4bf68be8741d90eb2b25901598bbc (diff)
parentd11a146516557fe4298f7af45c789346cc41fbd8 (diff)
downloadrneovim-42bdccdf6c36576a080becc8b68993af7c855aa6.tar.gz
rneovim-42bdccdf6c36576a080becc8b68993af7c855aa6.tar.bz2
rneovim-42bdccdf6c36576a080becc8b68993af7c855aa6.zip
Merge pull request #10234 from bfredl/resizefloat
window: allow resize wincmds for floats
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r--src/nvim/ex_docmd.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index a494463f89..1d27cf338e 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -6922,16 +6922,17 @@ static void ex_resize(exarg_T *eap)
n = atol((char *)eap->arg);
if (cmdmod.split & WSP_VERT) {
- if (*eap->arg == '-' || *eap->arg == '+')
+ if (*eap->arg == '-' || *eap->arg == '+') {
n += curwin->w_width;
- else if (n == 0 && eap->arg[0] == NUL) /* default is very wide */
- n = 9999;
+ } else if (n == 0 && eap->arg[0] == NUL) { // default is very wide
+ n = Columns;
+ }
win_setwidth_win(n, wp);
} else {
if (*eap->arg == '-' || *eap->arg == '+') {
n += curwin->w_height;
} else if (n == 0 && eap->arg[0] == NUL) { // default is very high
- n = 9999;
+ n = Rows-1;
}
win_setheight_win(n, wp);
}