mirror of
https://github.com/neovim/neovim.git
synced 2026-07-22 00:51:33 +00:00
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)
a7583c42cd
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user