aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2025-02-28 13:40:26 +0800
committerzeertzjq <zeertzjq@outlook.com>2025-02-28 18:21:07 +0800
commita3a9f86d4a11029542a94b00044b5a181a68c9cd (patch)
treea7c1400e2cf08609baa4ade617e6fcd1f617d6e9 /src/nvim/eval.c
parent9b25c68db21c4a2c1edc0d9eb2cdb80cf249193a (diff)
downloadrneovim-a3a9f86d4a11029542a94b00044b5a181a68c9cd.tar.gz
rneovim-a3a9f86d4a11029542a94b00044b5a181a68c9cd.tar.bz2
rneovim-a3a9f86d4a11029542a94b00044b5a181a68c9cd.zip
vim-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 vim/vim#9967) https://github.com/vim/vim/commit/36a5b6867bb6c0bd69c8da7d788000ab8a0b0ab0 Most code and test changes are reverted or modified again in patch 8.2.4603, so only port parts that are untouched in patch 8.2.4603. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 2b6fefbf82..ee5dd25e93 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -759,7 +759,7 @@ void fill_evalarg_from_eap(evalarg_T *evalarg, exarg_T *eap, bool skip)
return;
}
- if (getline_equal(eap->ea_getline, eap->cookie, getsourceline)) {
+ if (sourcing_a_script(eap)) {
evalarg->eval_getline = eap->ea_getline;
evalarg->eval_cookie = eap->cookie;
}