diff options
| author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2026-04-19 23:36:47 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-20 11:36:47 +0800 |
| commit | 61daad3bbaa30c916ee96dba4747fba3556878e1 (patch) | |
| tree | 0da9742f252a7a16920407ad86ef7c97ee5aed80 /src | |
| parent | 310cc36fdaa83cd698836f35eadab37e6be009dd (diff) | |
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>
Diffstat (limited to 'src')
| -rw-r--r-- | src/nvim/eval.c | 3 | ||||
| -rw-r--r-- | src/nvim/eval/funcs.c | 2 | ||||
| -rw-r--r-- | src/nvim/os/os_win_console.c | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 0173ce0634..2cbde770bb 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -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; } diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index a2d8ed8bc2..c21655b7ab 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -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; diff --git a/src/nvim/os/os_win_console.c b/src/nvim/os/os_win_console.c index adae089785..19870ec2b0 100644 --- a/src/nvim/os/os_win_console.c +++ b/src/nvim/os/os_win_console.c @@ -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) |
