diff options
author | Felipe Morales <hel.sheep@gmail.com> | 2015-01-10 20:27:17 -0300 |
---|---|---|
committer | Felipe Morales <hel.sheep@gmail.com> | 2015-04-28 23:08:30 -0300 |
commit | 86330fdd3f39a8975b25b7050a3d02b77a442057 (patch) | |
tree | 51f60759b67fec7740cc7a6adbb9c2bac4395b73 /src/nvim/ex_cmds_defs.h | |
parent | 6a8862ded4d6f1693ac591ac8e47d1acbd044c49 (diff) | |
download | rneovim-86330fdd3f39a8975b25b7050a3d02b77a442057.tar.gz rneovim-86330fdd3f39a8975b25b7050a3d02b77a442057.tar.bz2 rneovim-86330fdd3f39a8975b25b7050a3d02b77a442057.zip |
vim-patch:7.4.530-531
Specify different kinds of counts for commands.
Updated ex commands generator scripts.
Includes fixes to comments from patch 7.4.531
Original message:
Problem: Many commands take a count or range that is not using line
numbers.
Solution: For each command specify what kind of count it uses. For
windows, buffers and arguments have "$" and "." have a
relevant
meaning. (Marcin Szamotulski)
https://code.google.com/p/vim/source/detail?r=v7-4-530
https://code.google.com/p/vim/source/detail?r=v7-4-531
Add legacy tests for 7.4.530
https://code.google.com/p/vim/source/detail?r=1e6d87a36dcdca231721dde8cbbc26610fb3df27
Diffstat (limited to 'src/nvim/ex_cmds_defs.h')
-rw-r--r-- | src/nvim/ex_cmds_defs.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nvim/ex_cmds_defs.h b/src/nvim/ex_cmds_defs.h index 1b920511b6..4703e9b8ad 100644 --- a/src/nvim/ex_cmds_defs.h +++ b/src/nvim/ex_cmds_defs.h @@ -71,6 +71,14 @@ #define WORD1 (EXTRA | NOSPC) /* one extra word allowed */ #define FILE1 (FILES | NOSPC) /* 1 file allowed, defaults to current file */ +// values for cmd_addr_type +#define ADDR_LINES 0 +#define ADDR_WINDOWS 1 +#define ADDR_ARGUMENTS 2 +#define ADDR_LOADED_BUFFERS 3 +#define ADDR_UNLOADED_BUFFERS 4 +#define ADDR_TABS 5 + typedef struct exarg exarg_T; /* behavior for bad character, "++bad=" argument */ @@ -87,6 +95,7 @@ typedef struct cmdname { char_u *cmd_name; ///< Name of the command. ex_func_T cmd_func; ///< Function with implementation of this command. uint32_t cmd_argt; ///< Relevant flags from the declared above. + int cmd_addr_type; ///< Flag for address type } CommandDefinition; /// Arguments used for Ex commands. @@ -102,6 +111,7 @@ struct exarg { int addr_count; ///< the number of addresses given linenr_T line1; ///< the first line number linenr_T line2; ///< the second line number or count + int addr_type; ///< type of the count/range int flags; ///< extra flags after count: EXFLAG_ char_u *do_ecmd_cmd; ///< +command arg to be used in edited file linenr_T do_ecmd_lnum; ///< the line number in an edited file |