diff options
author | KunMing Xie <qqzz014@gmail.com> | 2018-02-12 07:00:24 +0800 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-02-12 00:00:24 +0100 |
commit | 6bcee20806960fca2876cb76544cbca50831692e (patch) | |
tree | 83c233370112394c4eb7c851db16fb973addd11f /src/nvim/window.c | |
parent | f389196a344591da2f6cc2a63f4953e34316f954 (diff) | |
download | rneovim-6bcee20806960fca2876cb76544cbca50831692e.tar.gz rneovim-6bcee20806960fca2876cb76544cbca50831692e.tar.bz2 rneovim-6bcee20806960fca2876cb76544cbca50831692e.zip |
vim-patch:8.0.0490: vertical split makes 'winfixwidth' window smaller (#7990)
Problem: Splitting a 'winfixwidth' window vertically makes it one column
smaller. (Dominique Pelle)
Solution: Add one to the width for the separator.
https://github.com/vim/vim/commit/38e3483637c16e018f88c07b1dcff97cdb821a29
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r-- | src/nvim/window.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c index 4dfc72f212..8d7e20bb73 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -641,11 +641,12 @@ int win_split_ins(int size, int flags, win_T *new_wp, int dir) if (oldwin->w_width - new_size - 1 < p_wmw) do_equal = TRUE; - /* We don't like to take lines for the new window from a - * 'winfixwidth' window. Take them from a window to the left or right - * instead, if possible. */ - if (oldwin->w_p_wfw) - win_setwidth_win(oldwin->w_width + new_size, oldwin); + // We don't like to take lines for the new window from a + // 'winfixwidth' window. Take them from a window to the left or right + // instead, if possible. Add one for the separator. + if (oldwin->w_p_wfw) { + win_setwidth_win(oldwin->w_width + new_size + 1, oldwin); + } /* Only make all windows the same width if one of them (except oldwin) * is wider than one of the split windows. */ |