To: vim_dev@googlegroups.com Subject: Patch 8.0.0490 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.0490 Problem: Splitting a 'winfixwidth' window vertically makes it one column smaller. (Dominique Pelle) Solution: Add one to the width for the separator. Files: src/window.c, src/testdir/test_window_cmd.vim *** ../vim-8.0.0489/src/window.c 2017-03-19 17:09:51.835080722 +0100 --- src/window.c 2017-03-19 20:13:37.414467919 +0100 *************** *** 870,878 **** /* 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); /* Only make all windows the same width if one of them (except oldwin) * is wider than one of the split windows. */ --- 870,878 ---- /* 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. */ *** ../vim-8.0.0489/src/testdir/test_window_cmd.vim 2017-03-19 16:09:41.153653947 +0100 --- src/testdir/test_window_cmd.vim 2017-03-19 20:16:24.817250219 +0100 *************** *** 294,313 **** set winfixwidth vsplit Xc let [ww1, ww2, ww3] = [winwidth(1), winwidth(2), winwidth(3)] ! " FIXME: commented out: I would expect the width of 2nd window to ! " remain 2 but it's actually 1?! ! "call assert_equal(2, winwidth(2)) call assert_inrange(ww3, ww3 + 1, ww1) 3wincmd > ! " FIXME: commented out: I would expect the width of 2nd window to ! " remain 2 but it's actually 1?! ! "call assert_equal(2, winwidth(2)) call assert_equal(ww1 + 3, winwidth(1)) call assert_equal(ww3 - 3, winwidth(3)) wincmd = ! " FIXME: commented out: I would expect the width of 2nd window to ! " remain 2 but it's actually 1?! ! "call assert_equal(2, winwidth(2)) call assert_equal(ww1, winwidth(1)) call assert_equal(ww3, winwidth(3)) --- 294,307 ---- set winfixwidth vsplit Xc let [ww1, ww2, ww3] = [winwidth(1), winwidth(2), winwidth(3)] ! call assert_equal(2, winwidth(2)) call assert_inrange(ww3, ww3 + 1, ww1) 3wincmd > ! call assert_equal(2, winwidth(2)) call assert_equal(ww1 + 3, winwidth(1)) call assert_equal(ww3 - 3, winwidth(3)) wincmd = ! call assert_equal(2, winwidth(2)) call assert_equal(ww1, winwidth(1)) call assert_equal(ww3, winwidth(3)) *** ../vim-8.0.0489/src/version.c 2017-03-19 20:04:05.534628090 +0100 --- src/version.c 2017-03-19 20:22:18.270679285 +0100 *************** *** 766,767 **** --- 766,769 ---- { /* Add new patch number below this line */ + /**/ + 490, /**/ -- "Hit any key to continue" it said, but nothing happened after F sharp. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///