To: vim_dev@googlegroups.com Subject: Patch 8.2.2469 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2469 Problem: Confusing error if :winsize has a wrong argument. Solution: Quote the argument in the error. (closes #2523) Files: src/ex_docmd.c, src/testdir/test_excmd.vim *** ../vim-8.2.2468/src/ex_docmd.c 2021-02-06 12:38:47.623324174 +0100 --- src/ex_docmd.c 2021-02-06 12:53:24.531721993 +0100 *************** *** 7347,7352 **** --- 7347,7357 ---- char_u *arg = eap->arg; char_u *p; + if (!isdigit(*arg)) + { + semsg(_(e_invarg2), arg); + return; + } w = getdigits(&arg); arg = skipwhite(arg); p = arg; *** ../vim-8.2.2468/src/testdir/test_excmd.vim 2020-07-11 22:14:54.314422214 +0200 --- src/testdir/test_excmd.vim 2021-02-06 12:57:46.811615742 +0100 *************** *** 327,332 **** --- 327,335 ---- " Test for the :winsize command func Test_winsize_cmd() call assert_fails('winsize 1', 'E465:') + call assert_fails('winsize 1 x', 'E465:') + call assert_fails('win_getid(1)', 'E475: Invalid argument: _getid(1)') + " Actually changing the window size would be flaky. endfunc " Test for the :redir command *** ../vim-8.2.2468/src/version.c 2021-02-06 12:38:47.627324159 +0100 --- src/version.c 2021-02-06 12:55:29.107421088 +0100 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2469, /**/ -- PRINCE: He's come to rescue me, father. LAUNCELOT: (embarrassed) Well, let's not jump to conclusions ... "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// 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 ///