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)
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 463d840..c33dcbc 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -2572,7 +2572,7 @@
#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