Mercurial > vim
diff src/ex_docmd.c @ 22685:80b4e604d1d5 v8.2.1891
patch 8.2.1891: Vim9: skipping over expression doesn't handle line breaks
Commit: https://github.com/vim/vim/commit/683581eb4980eda27d6438caab85c0a9cf551c24
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Oct 22 21:22:58 2020 +0200
patch 8.2.1891: Vim9: skipping over expression doesn't handle line breaks
Problem: Vim9: skipping over expression doesn't handle line breaks.
Solution: Pass evalarg to skip_expr(). (closes https://github.com/vim/vim/issues/7157)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 22 Oct 2020 21:30:04 +0200 |
parents | f773ac13c093 |
children | 6fe386286ea8 |
line wrap: on
line diff
--- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -640,7 +640,7 @@ do_cmdline( struct dbg_stuff debug_saved; // saved things for debug mode int initial_trylevel; msglist_T **saved_msg_list = NULL; - msglist_T *private_msg_list; + msglist_T *private_msg_list = NULL; // "fgetline" and "cookie" passed to do_one_cmd() char_u *(*cmd_getline)(int, void *, int, getline_opt_T); @@ -664,7 +664,6 @@ do_cmdline( // BufWritePost autocommands are executed after a write error. saved_msg_list = msg_list; msg_list = &private_msg_list; - private_msg_list = NULL; #endif // It's possible to create an endless loop with ":execute", catch that @@ -3256,7 +3255,7 @@ find_ex_command( // When followed by "=" or "+=" then it is an assignment. ++emsg_silent; - if (skip_expr(&after) == OK + if (skip_expr(&after, NULL) == OK && (*after == '=' || (*after != NUL && after[1] == '='))) eap->cmdidx = CMD_var; @@ -4391,7 +4390,7 @@ expand_filename( if (p[0] == '`' && p[1] == '=') { p += 2; - (void)skip_expr(&p); + (void)skip_expr(&p, NULL); if (*p == '`') ++p; continue; @@ -4666,7 +4665,7 @@ separate_nextcmd(exarg_T *eap) else if (p[0] == '`' && p[1] == '=' && (eap->argt & EX_XFILE)) { p += 2; - (void)skip_expr(&p); + (void)skip_expr(&p, NULL); } #endif