1
0
forked from aniani/vim

patch 8.2.2332: Vim9: missing :endif not reported when using :windo

Problem:    Vim9: missing :endif not reported when using :windo.
Solution:   Pass a getline function to do_cmdline(). (closes #7650)
This commit is contained in:
Bram Moolenaar
2021-01-11 22:16:30 +01:00
parent 082517570d
commit 9567efa1b4
5 changed files with 62 additions and 42 deletions

View File

@@ -4300,6 +4300,32 @@ typedef struct
int sa_wrapped; // search wrapped around
} searchit_arg_T;
/*
* Cookie used by getsourceline().
*/
/*
* Cookie used to store info for each sourced file.
* It is shared between do_source() and getsourceline().
* This is passed to do_cmdline().
*/
typedef struct {
FILE *fp; // opened file for sourcing
char_u *nextline; // if not NULL: line that was read ahead
linenr_T sourcing_lnum; // line number of the source file
int finished; // ":finish" used
#ifdef USE_CRNL
int fileformat; // EOL_UNKNOWN, EOL_UNIX or EOL_DOS
int error; // TRUE if LF found after CR-LF
#endif
#ifdef FEAT_EVAL
linenr_T breakpoint; // next line with breakpoint or zero
char_u *fname; // name of sourced file
int dbg_tick; // debug_tick when breakpoint was set
int level; // top nesting level of sourced file
#endif
vimconv_T conv; // type of conversion
} source_cookie_T;
#define WRITEBUFSIZE 8192 // size of normal write buffer