To: vim-dev@vim.org Subject: Patch 6.1.435 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.435 Problem: ":winsize x" resizes the Vim window to the minimal size. (Andrew Pimlott) Solution: Give an error message for wrong arguments of ":winsize" and ":winpos". Files: src/ex_docmd.c *** ../vim61.434/src/ex_docmd.c Mon Mar 31 22:05:39 2003 --- src/ex_docmd.c Tue Apr 1 20:45:15 2003 *************** *** 6232,6242 **** { int w, h; char_u *arg = eap->arg; w = getdigits(&arg); arg = skipwhite(arg); h = getdigits(&arg); ! set_shellsize(w, h, TRUE); } #ifdef FEAT_WINDOWS --- 6232,6247 ---- { int w, h; char_u *arg = eap->arg; + char_u *p; w = getdigits(&arg); arg = skipwhite(arg); + p = arg; h = getdigits(&arg); ! if (*p != NUL && *arg == NUL) ! set_shellsize(w, h, TRUE); ! else ! EMSG(_("E465: :winsize requires two number arguments")); } #ifdef FEAT_WINDOWS *************** *** 6280,6285 **** --- 6285,6291 ---- { int x, y; char_u *arg = eap->arg; + char_u *p; if (*arg == NUL) { *************** *** 6297,6303 **** --- 6303,6315 ---- { x = getdigits(&arg); arg = skipwhite(arg); + p = arg; y = getdigits(&arg); + if (*p == NUL || *arg != NUL) + { + EMSG(_("E466: :winpos requires two number arguments")); + return; + } # ifdef FEAT_GUI if (gui.in_use) gui_mch_set_winpos(x, y); *** ../vim61.434/src/version.c Mon Mar 31 22:44:28 2003 --- src/version.c Tue Apr 1 22:07:46 2003 *************** *** 613,614 **** --- 613,616 ---- { /* Add new patch number below this line */ + /**/ + 435, /**/ -- Experience is what you get when you don't get what you want. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///