aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds_defs.h
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-12-31 19:56:15 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-01-01 04:30:55 -0500
commitf3c242c13cc9aaefd29f750d211fff76e1fada68 (patch)
tree5096f59f4d61c1493d37456fb8cb890f8a281d1e /src/nvim/ex_cmds_defs.h
parentcf3a8610172feec1fb8ab2863bdad69eb1296f28 (diff)
downloadrneovim-f3c242c13cc9aaefd29f750d211fff76e1fada68.tar.gz
rneovim-f3c242c13cc9aaefd29f750d211fff76e1fada68.tar.bz2
rneovim-f3c242c13cc9aaefd29f750d211fff76e1fada68.zip
vim-patch:8.1.1241: Ex command info contains confusing information
Problem: Ex command info contains confusing information. Solution: When using the NOTADR flag use ADDR_OTHER for the address type. Cleanup code using NOTADR. Check for errors in create_cmdidxs.vim. Adjust Makefile to see the errors. https://github.com/vim/vim/commit/b731689e85b4153af7edc8f0a6b9f99d36d8b011 Use Lua's "assert()" to make an invalid command definition a compilation error. Misc changes: Remove 'RESTRICT' flag. Neovim does not support "restricted" mode since commit 7777532cebcfa9abc5ab2c7beae77f386feed3ca. TODO: Do not generate files before Lua assertions so that CMake always runs the generator script if the previous build has an invalid command definition.
Diffstat (limited to 'src/nvim/ex_cmds_defs.h')
-rw-r--r--src/nvim/ex_cmds_defs.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/nvim/ex_cmds_defs.h b/src/nvim/ex_cmds_defs.h
index 5613ae4b8c..07a09e3a2e 100644
--- a/src/nvim/ex_cmds_defs.h
+++ b/src/nvim/ex_cmds_defs.h
@@ -51,17 +51,16 @@
#define NOTRLCOM 0x800 // no trailing comment allowed
#define ZEROR 0x1000 // zero line number allowed
#define USECTRLV 0x2000 // do not remove CTRL-V from argument
-#define NOTADR 0x4000 // number before command is not an address
-#define EDITCMD 0x8000 // allow "+command" argument
-#define BUFNAME 0x10000 // accepts buffer name
-#define BUFUNL 0x20000 // accepts unlisted buffer too
-#define ARGOPT 0x40000 // allow "++opt=val" argument
-#define SBOXOK 0x80000 // allowed in the sandbox
-#define CMDWIN 0x100000 // allowed in cmdline window; when missing
+#define EDITCMD 0x4000 // allow "+command" argument
+#define BUFNAME 0x8000 // accepts buffer name
+#define BUFUNL 0x10000L // accepts unlisted buffer too
+#define ARGOPT 0x20000L // allow "++opt=val" argument
+#define SBOXOK 0x40000L // allowed in the sandbox
+#define CMDWIN 0x80000L // allowed in cmdline window; when missing
// disallows editing another buffer when
// curbuf_lock is set
-#define MODIFY 0x200000 // forbidden in non-'modifiable' buffer
-#define EXFLAGS 0x400000 // allow flags after count in argument
+#define MODIFY 0x100000L // forbidden in non-'modifiable' buffer
+#define EXFLAGS 0x200000L // allow flags after count in argument
#define FILES (XFILE | EXTRA) // multiple extra files allowed
#define WORD1 (EXTRA | NOSPC) // one extra word allowed
#define FILE1 (FILES | NOSPC) // 1 file allowed, defaults to current file
@@ -153,7 +152,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
+ cmd_addr_T 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