robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

Justin M. Keyesrefactor(exmode): Ex-mode as cmdwin + Lua #40991359459dec6

master
2.2 KiB56 linesraw
1#pragma once
2
3#include <stdbool.h>
4
5#include "nvim/types_defs.h"
6
7// Maximum number of commands from + or -c arguments.
8#define MAX_ARG_CMDS 10
9
10extern Loop main_loop;
11
12// Struct for various parameters passed between main() and other functions.
13typedef struct {
14  int argc;
15  char **argv;
16
17  char *use_vimrc;                      // vimrc from -u argument
18  bool clean;                           // --clean argument
19
20  int n_commands;                       // no. of commands from + or -c
21  char *commands[MAX_ARG_CMDS];         // commands from + or -c arg
22  char cmds_tofree[MAX_ARG_CMDS];       // commands that need free()
23  int n_pre_commands;                   // no. of commands from --cmd
24  char *pre_commands[MAX_ARG_CMDS];     // commands from --cmd argument
25  char *luaf;                           // Lua script filename from "-l"
26  int lua_arg0;                         // Lua script args start index.
27
28  int edit_type;                        // type of editing to do
29  char *tagname;                        // tag from -t argument
30  char *use_ef;                         // 'errorfile' from -q argument
31
32  bool exmode;                          // "-e"/"-E": Ex mode
33  bool input_istext;                    // stdin is text, not executable (-E/-Es)
34
35  int no_swap_file;                     // "-n" argument used
36  int use_debug_break_level;
37  int window_count;                     // number of windows to use
38  int window_layout;                    // 0, WIN_HOR, WIN_VER or WIN_TABS
39
40  int diff_mode;                        // start with 'diff' set
41
42  char *listen_addr;                    // --listen {address}
43  int remote;                           // --remote-[subcmd] {file1} {file2}
44  char *server_addr;                    // --server {address}
45  char *scriptin;                       // -s {filename}
46  char *scriptout;                      // -w/-W {filename}
47  bool scriptout_append;                // append (-w) instead of overwrite (-W)
48  bool had_stdin_file;                  // explicit - as a file to edit
49} mparm_T;
50
51#if defined(MSWIN) && !defined(ENABLE_ASAN_UBSAN)
52# define __asan_default_options vim__asan_default_options
53# define __ubsan_default_options vim__ubsan_default_options
54#endif
55
56#include "main.h.generated.h"