0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.1064: Vim9: no line break allowed before comperators

Problem:    Vim9: no line break allowed before comperators.
Solution:   Check for comperator after line break.
This commit is contained in:
Bram Moolenaar
2020-06-26 22:00:38 +02:00
parent be7ee48876
commit e6536aa766
3 changed files with 44 additions and 1 deletions

View File

@@ -2191,6 +2191,7 @@ eval4(char_u **arg, typval_T *rettv, evalarg_T *evalarg)
{
typval_T var2;
char_u *p;
int getnext;
int i;
exptype_T type = EXPR_UNKNOWN;
int len = 2;
@@ -2202,7 +2203,7 @@ eval4(char_u **arg, typval_T *rettv, evalarg_T *evalarg)
if (eval5(arg, rettv, evalarg) == FAIL)
return FAIL;
p = *arg;
p = eval_next_non_blank(*arg, evalarg, &getnext);
switch (p[0])
{
case '=': if (p[1] == '=')
@@ -2247,6 +2248,9 @@ eval4(char_u **arg, typval_T *rettv, evalarg_T *evalarg)
*/
if (type != EXPR_UNKNOWN)
{
if (getnext)
*arg = eval_next_line(evalarg);
// extra question mark appended: ignore case
if (p[len] == '?')
{