diff src/ex_docmd.c @ 28158:e1d1fa6ba1ed v8.2.4603

patch 8.2.4603: sourcing buffer lines is too complicated Commit: https://github.com/vim/vim/commit/85b43c6cb7d56919e245622f4e42db6d8bee4194 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Mon Mar 21 19:45:17 2022 +0000 patch 8.2.4603: sourcing buffer lines is too complicated Problem: Sourcing buffer lines is too complicated. Solution: Simplify the code. Make it possible to source Vim9 script lines. (Yegappan Lakshmanan, closes #9974)
author Bram Moolenaar <Bram@vim.org>
date Mon, 21 Mar 2022 21:00:04 +0100
parents dd2ed5345f20
children 49631bf057d3
line wrap: on
line diff
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -2572,7 +2572,7 @@ do_one_cmd(
 #ifdef FEAT_EVAL
     // Set flag that any command was executed, used by ex_vim9script().
     // Not if this was a command that wasn't executed or :endif.
-    if (getline_equal(ea.getline, ea.cookie, getsourceline)
+    if (sourcing_a_script(&ea)
 	    && current_sctx.sc_sid > 0
 	    && ea.cmdidx != CMD_endif
 	    && (cstack->cs_idx < 0