From 336eb70822970cea6797251043158ee6bd76bc69 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 6 Feb 2021 12:24:24 -0500 Subject: vim-patch:8.2.2469: confusing error if :winsize has a wrong argument (#13889) Problem: Confusing error if :winsize has a wrong argument. Solution: Quote the argument in the error. (closes vim/vim#2523) https://github.com/vim/vim/commit/f5a5116a96b1877c3f44e7bae288fd6603151eb1 Cherry-pick Test_winsize_cmd() from patch v8.2.0243. --- src/nvim/ex_docmd.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/nvim/ex_docmd.c') diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 52da7fe4f6..f55344e77e 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -7756,6 +7756,11 @@ static void do_exmap(exarg_T *eap, int isabbrev) static void ex_winsize(exarg_T *eap) { char_u *arg = eap->arg; + + if (!ascii_isdigit(*arg)) { + EMSG2(_(e_invarg2), arg); + return; + } int w = getdigits_int(&arg, false, 10); arg = skipwhite(arg); char_u *p = arg; -- cgit