To: vim_dev@googlegroups.com Subject: Patch 8.2.1856 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1856 Problem: "2resize" uses size of current window. (Daniel Steinberg) Solution: Use size of resized window. (Yasuhiro Matsumoto, closes #7152) Files: src/ex_docmd.c, src/testdir/test_window_cmd.vim *** ../vim-8.2.1855/src/ex_docmd.c 2020-10-16 19:56:08.581996958 +0200 --- src/ex_docmd.c 2020-10-17 17:36:30.825624736 +0200 *************** *** 6365,6371 **** if (cmdmod.split & WSP_VERT) { if (*eap->arg == '-' || *eap->arg == '+') ! n += curwin->w_width; else if (n == 0 && eap->arg[0] == NUL) // default is very wide n = 9999; win_setwidth_win((int)n, wp); --- 6365,6371 ---- if (cmdmod.split & WSP_VERT) { if (*eap->arg == '-' || *eap->arg == '+') ! n += wp->w_width; else if (n == 0 && eap->arg[0] == NUL) // default is very wide n = 9999; win_setwidth_win((int)n, wp); *************** *** 6373,6379 **** else { if (*eap->arg == '-' || *eap->arg == '+') ! n += curwin->w_height; else if (n == 0 && eap->arg[0] == NUL) // default is very high n = 9999; win_setheight_win((int)n, wp); --- 6373,6379 ---- else { if (*eap->arg == '-' || *eap->arg == '+') ! n += wp->w_height; else if (n == 0 && eap->arg[0] == NUL) // default is very high n = 9999; win_setheight_win((int)n, wp); *** ../vim-8.2.1855/src/testdir/test_window_cmd.vim 2020-09-04 21:18:40.492161906 +0200 --- src/testdir/test_window_cmd.vim 2020-10-17 17:36:30.825624736 +0200 *************** *** 1144,1149 **** --- 1144,1153 ---- exe other_winnr .. 'resize 10' call assert_equal(10, winheight(other_winnr)) call assert_equal(&lines - 10 - 3, winheight(0)) + exe other_winnr .. 'resize +1' + exe other_winnr .. 'resize +1' + call assert_equal(12, winheight(other_winnr)) + call assert_equal(&lines - 10 - 3 -2, winheight(0)) %bwipe! endfunc *** ../vim-8.2.1855/src/version.c 2020-10-16 23:16:43.459258200 +0200 --- src/version.c 2020-10-17 17:38:35.617267102 +0200 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 1856, /**/ -- % cat /usr/include/real_life.h void life(void); /// 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 ///