Mercurial > vim
comparison src/eval.c @ 28139:f34afadbef47 v8.2.4594
patch 8.2.4594: need to write script to a file to be able to source them
Commit: https://github.com/vim/vim/commit/36a5b6867bb6c0bd69c8da7d788000ab8a0b0ab0
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Sat Mar 19 12:56:51 2022 +0000
patch 8.2.4594: need to write script to a file to be able to source them
Problem: Need to write script to a file to be able to source them.
Solution: Make ":source" use lines from the current buffer. (Yegappan
Lakshmanan et al., closes #9967)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 19 Mar 2022 14:00:03 +0100 |
parents | dd2ed5345f20 |
children | 22c8cafe8c9c |
comparison
equal
deleted
inserted
replaced
28138:d14809743aa0 | 28139:f34afadbef47 |
---|---|
138 init_evalarg(evalarg); | 138 init_evalarg(evalarg); |
139 evalarg->eval_flags = skip ? 0 : EVAL_EVALUATE; | 139 evalarg->eval_flags = skip ? 0 : EVAL_EVALUATE; |
140 if (eap != NULL) | 140 if (eap != NULL) |
141 { | 141 { |
142 evalarg->eval_cstack = eap->cstack; | 142 evalarg->eval_cstack = eap->cstack; |
143 if (getline_equal(eap->getline, eap->cookie, getsourceline)) | 143 if (sourcing_a_script(eap)) |
144 { | 144 { |
145 evalarg->eval_getline = eap->getline; | 145 evalarg->eval_getline = eap->getline; |
146 evalarg->eval_cookie = eap->cookie; | 146 evalarg->eval_cookie = eap->cookie; |
147 } | 147 } |
148 } | 148 } |