comparison src/eval.c @ 21620:46956b6811a1 v8.2.1360

patch 8.2.1360: stray error for white space after expression Commit: https://github.com/vim/vim/commit/f96e9dec636d7d105b015680d8c5d6b47d936e01 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Aug 3 22:39:28 2020 +0200 patch 8.2.1360: stray error for white space after expression Problem: Stray error for white space after expression. Solution: Ignore trailing white space. (closes https://github.com/vim/vim/issues/6608)
author Bram Moolenaar <Bram@vim.org>
date Mon, 03 Aug 2020 22:45:07 +0200
parents cbc570e66d11
children 1f2066e3975a
comparison
equal deleted inserted replaced
21619:aae35544194c 21620:46956b6811a1
298 if (s == NULL) 298 if (s == NULL)
299 return FAIL; 299 return FAIL;
300 s = skipwhite(s); 300 s = skipwhite(s);
301 if (eval1_emsg(&s, rettv, NULL) == FAIL) 301 if (eval1_emsg(&s, rettv, NULL) == FAIL)
302 return FAIL; 302 return FAIL;
303 if (*s != NUL) // check for trailing chars after expr 303 if (*skipwhite(s) != NUL) // check for trailing chars after expr
304 { 304 {
305 clear_tv(rettv); 305 clear_tv(rettv);
306 semsg(_(e_invexpr2), s); 306 semsg(_(e_invexpr2), s);
307 return FAIL; 307 return FAIL;
308 } 308 }