diff options
author | ckelsel <ckelsel@hotmail.com> | 2017-07-28 08:38:08 +0800 |
---|---|---|
committer | ckelsel <ckelsel@hotmail.com> | 2017-07-28 08:38:08 +0800 |
commit | 3e0536eb295309c728acca386ec35756b7e034f6 (patch) | |
tree | f4ef3ef657245cf6d96a3d777ae63c6fda5b11d0 /src/nvim/ex_cmds.c | |
parent | 31c018244daa12caab3af357a368279a1f55d28c (diff) | |
parent | e6d54407ba8ce580fbd81cb9389eb9ce4483597b (diff) | |
download | rneovim-3e0536eb295309c728acca386ec35756b7e034f6.tar.gz rneovim-3e0536eb295309c728acca386ec35756b7e034f6.tar.bz2 rneovim-3e0536eb295309c728acca386ec35756b7e034f6.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r-- | src/nvim/ex_cmds.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index 0987cb3915..a555fb77e8 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -2802,16 +2802,18 @@ void ex_z(exarg_T *eap) int j; linenr_T lnum = eap->line2; - /* Vi compatible: ":z!" uses display height, without a count uses - * 'scroll' */ - if (eap->forceit) + // Vi compatible: ":z!" uses display height, without a count uses + // 'scroll' + if (eap->forceit) { bigness = curwin->w_height; - else if (firstwin == lastwin) + } else if (ONE_WINDOW) { bigness = curwin->w_p_scr * 2; - else + } else { bigness = curwin->w_height - 3; - if (bigness < 1) + } + if (bigness < 1) { bigness = 1; + } x = eap->arg; kind = x; |