vim-patch:8.2.4912: using execute() to define a lambda doesn't work (#39229)

Problem:    Using execute() to define a lambda doesn't work. (Ernie Rael)
Solution:   Put the getline function in evalarg. (closes vim/vim#10375)

https://github.com/vim/vim/commit/a7583c42cd6b64fd276a5d7bb0db5ce7bfafa730

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
Jan Edmund LazoandBram Moolenaar authored and GitHub committed 2026-04-20 11:36:47 +08:00
1 parent 310cc36fda
commit 61daad3bba
3 files changed
+4 -3

No files matched your search

+2 -1
View File
@@ -26,6 +26,7 @@
#include "nvim/eval.h"
#include "nvim/eval/encode.h"
#include "nvim/eval/executor.h"
#include "nvim/eval/funcs.h"
#include "nvim/eval/gc.h"
#include "nvim/eval/typval.h"
#include "nvim/eval/userfunc.h"
@@ -235,7 +236,7 @@ void fill_evalarg_from_eap(evalarg_T *evalarg, exarg_T *eap, bool skip)
return;
}
if (sourcing_a_script(eap)) {
if (sourcing_a_script(eap) || eap->ea_getline == get_list_line) {
evalarg->eval_getline = eap->ea_getline;
evalarg->eval_cookie = eap->cookie;
}
+1 -1
View File
@@ -1261,7 +1261,7 @@ typedef struct {
const listitem_T *li;
} GetListLineCookie;
static char *get_list_line(int c, void *cookie, int indent, bool do_concat)
char *get_list_line(int c, void *cookie, int indent, bool do_concat)
{
GetListLineCookie *const p = (GetListLineCookie *)cookie;
+1 -1
View File
@@ -21,7 +21,7 @@ static HICON hOrigIcon = NULL;
/// once the embedded server has a console so terminal jobs inherit it.
void os_enable_ctrl_c(void)
{
SetConsoleCtrlHandler(NULL, FALSE);
SetConsoleCtrlHandler(NULL, false);
}
int os_open_conin_fd(void)