Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
28157:81034dff92a4 | 28158:e1d1fa6ba1ed |
---|---|
2570 } | 2570 } |
2571 | 2571 |
2572 #ifdef FEAT_EVAL | 2572 #ifdef FEAT_EVAL |
2573 // Set flag that any command was executed, used by ex_vim9script(). | 2573 // Set flag that any command was executed, used by ex_vim9script(). |
2574 // Not if this was a command that wasn't executed or :endif. | 2574 // Not if this was a command that wasn't executed or :endif. |
2575 if (getline_equal(ea.getline, ea.cookie, getsourceline) | 2575 if (sourcing_a_script(&ea) |
2576 && current_sctx.sc_sid > 0 | 2576 && current_sctx.sc_sid > 0 |
2577 && ea.cmdidx != CMD_endif | 2577 && ea.cmdidx != CMD_endif |
2578 && (cstack->cs_idx < 0 | 2578 && (cstack->cs_idx < 0 |
2579 || (cstack->cs_flags[cstack->cs_idx] & CSF_ACTIVE))) | 2579 || (cstack->cs_flags[cstack->cs_idx] & CSF_ACTIVE))) |
2580 SCRIPT_ITEM(current_sctx.sc_sid)->sn_state = SN_STATE_HAD_COMMAND; | 2580 SCRIPT_ITEM(current_sctx.sc_sid)->sn_state = SN_STATE_HAD_COMMAND; |