diff src/structs.h @ 23580:dc3b7a31c29f v8.2.2332

patch 8.2.2332: Vim9: missing :endif not reported when using :windo Commit: https://github.com/vim/vim/commit/9567efa1b4a41baca9b2266f5903d5dda7ad1e88 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jan 11 22:16:30 2021 +0100 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 https://github.com/vim/vim/issues/7650)
author Bram Moolenaar <Bram@vim.org>
date Mon, 11 Jan 2021 22:30:06 +0100
parents 85ce241ff9e3
children e3720756acdc
line wrap: on
line diff
--- a/src/structs.h
+++ b/src/structs.h
@@ -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