vim-patch:8.2.1274: Vim9: no error for missing white space at script level

Problem:    Vim9: no error for missing white space in assignment at script
            level.
Solution:   Check for white space. (closes vim/vim#6495)

63be3d4ba0

Cherry-pick Test_let_errors() change from patch 8.2.0633.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2022-11-06 06:31:00 +08:00
parent 5b8d8a4c99
commit e03f23189d
3 changed files with 15 additions and 5 deletions

View File

@@ -231,11 +231,13 @@ static void ex_let_const(exarg_T *eap, const bool is_const)
expr++;
}
}
expr = skipwhite(expr + 2);
expr += 2;
} else {
expr = skipwhite(expr + 1);
expr += 1;
}
expr = skipwhite(expr);
if (eap->skip) {
emsg_skip++;
}