diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-08-18 21:44:12 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-08-18 21:44:12 +0200 |
commit | 66b51420e0c8d49bcf6786b792c938d6099e3393 (patch) | |
tree | 04d7f116a3ae2360ba8b68c2f4ce9544afb1e7f4 /src/structs.h | |
parent | db1085a5630ffdaa2e9f342c06cc739ebdf1a99a (diff) |
patch 8.1.1886: command line expansion code is spread outv8.1.1886
Problem: Command line expansion code is spread out.
Solution: Move the code to cmdexpand.c. (Yegappan Lakshmanan, closes #4831)
Diffstat (limited to 'src/structs.h')
-rw-r--r-- | src/structs.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/structs.h b/src/structs.h index 0aedbbd2ca..97b1299fac 100644 --- a/src/structs.h +++ b/src/structs.h @@ -579,6 +579,33 @@ typedef struct expand #define XP_BS_THREE 2 // uses three backslashes before a space /* + * Variables shared between getcmdline(), redrawcmdline() and others. + * These need to be saved when using CTRL-R |, that's why they are in a + * structure. + */ +typedef struct +{ + char_u *cmdbuff; /* pointer to command line buffer */ + int cmdbufflen; /* length of cmdbuff */ + int cmdlen; /* number of chars in command line */ + int cmdpos; /* current cursor position */ + int cmdspos; /* cursor column on screen */ + int cmdfirstc; /* ':', '/', '?', '=', '>' or NUL */ + int cmdindent; /* number of spaces before cmdline */ + char_u *cmdprompt; /* message in front of cmdline */ + int cmdattr; /* attributes for prompt */ + int overstrike; /* Typing mode on the command line. Shared by + getcmdline() and put_on_cmdline(). */ + expand_T *xpc; /* struct being used for expansion, xp_pattern + may point into cmdbuff */ + int xp_context; /* type of expansion */ +# ifdef FEAT_EVAL + char_u *xp_arg; /* user-defined expansion arg */ + int input_fn; /* when TRUE Invoked for input() function */ +# endif +} cmdline_info_T; + +/* * Command modifiers ":vertical", ":browse", ":confirm" and ":hide" set a flag. * This needs to be saved for recursive commands, put them in a structure for * easy manipulation. |