From: Bram Moolenaar Date: Fri, 8 Feb 2019 16:50:26 +0100 Subject: patch 8.1.0883: missing some changes for Ex commands Problem: Missing some changes for Ex commands. Solution: Add mising changes in header file. (cherry picked from commit 54d6fe5e60c0c488a424c078963ead40ae7dc397) --- src/ex_cmds.h | 45 +++++++++++++++++++++++---------------------- src/version.c | 2 ++ 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/src/ex_cmds.h b/src/ex_cmds.h index 07afb00..eed4ce2 100644 --- a/src/ex_cmds.h +++ b/src/ex_cmds.h @@ -57,6 +57,7 @@ * curbuf_lock is set */ #define MODIFY 0x200000L /* forbidden in non-'modifiable' buffer */ #define EXFLAGS 0x400000L /* allow flags after count in argument */ +#define RESTRICT 0x800000L /* forbidden in restricted mode */ #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 */ @@ -861,13 +862,13 @@ EX(CMD_lunmap, "lunmap", ex_unmap, EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN, ADDR_LINES), EX(CMD_lua, "lua", ex_lua, - RANGE|EXTRA|NEEDARG|CMDWIN, + RANGE|EXTRA|NEEDARG|CMDWIN|RESTRICT, ADDR_LINES), EX(CMD_luado, "luado", ex_luado, - RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN, + RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN|RESTRICT, ADDR_LINES), EX(CMD_luafile, "luafile", ex_luafile, - RANGE|FILE1|NEEDARG|CMDWIN, + RANGE|FILE1|NEEDARG|CMDWIN|RESTRICT, ADDR_LINES), EX(CMD_lvimgrep, "lvimgrep", ex_vimgrep, RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE, @@ -930,10 +931,10 @@ EX(CMD_mode, "mode", ex_mode, WORD1|TRLBAR|CMDWIN, ADDR_LINES), EX(CMD_mzscheme, "mzscheme", ex_mzscheme, - RANGE|EXTRA|DFLALL|NEEDARG|CMDWIN|SBOXOK, + RANGE|EXTRA|DFLALL|NEEDARG|CMDWIN|SBOXOK|RESTRICT, ADDR_LINES), EX(CMD_mzfile, "mzfile", ex_mzfile, - RANGE|FILE1|NEEDARG|CMDWIN, + RANGE|FILE1|NEEDARG|CMDWIN|RESTRICT, ADDR_LINES), EX(CMD_next, "next", ex_next, RANGE|NOTADR|BANG|FILES|EDITCMD|ARGOPT|TRLBAR, @@ -1116,37 +1117,37 @@ EX(CMD_pwd, "pwd", ex_pwd, TRLBAR|CMDWIN, ADDR_LINES), EX(CMD_python, "python", ex_python, - RANGE|EXTRA|NEEDARG|CMDWIN, + RANGE|EXTRA|NEEDARG|CMDWIN|RESTRICT, ADDR_LINES), EX(CMD_pydo, "pydo", ex_pydo, - RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN, + RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN|RESTRICT, ADDR_LINES), EX(CMD_pyfile, "pyfile", ex_pyfile, - RANGE|FILE1|NEEDARG|CMDWIN, + RANGE|FILE1|NEEDARG|CMDWIN|RESTRICT, ADDR_LINES), EX(CMD_py3, "py3", ex_py3, - RANGE|EXTRA|NEEDARG|CMDWIN, + RANGE|EXTRA|NEEDARG|CMDWIN|RESTRICT, ADDR_LINES), EX(CMD_py3do, "py3do", ex_py3do, - RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN, + RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN|RESTRICT, ADDR_LINES), EX(CMD_python3, "python3", ex_py3, - RANGE|EXTRA|NEEDARG|CMDWIN, + RANGE|EXTRA|NEEDARG|CMDWIN|RESTRICT, ADDR_LINES), EX(CMD_py3file, "py3file", ex_py3file, - RANGE|FILE1|NEEDARG|CMDWIN, + RANGE|FILE1|NEEDARG|CMDWIN|RESTRICT, ADDR_LINES), EX(CMD_pyx, "pyx", ex_pyx, - RANGE|EXTRA|NEEDARG|CMDWIN, + RANGE|EXTRA|NEEDARG|CMDWIN|RESTRICT, ADDR_LINES), EX(CMD_pyxdo, "pyxdo", ex_pyxdo, - RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN, + RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN|RESTRICT, ADDR_LINES), EX(CMD_pythonx, "pythonx", ex_pyx, - RANGE|EXTRA|NEEDARG|CMDWIN, + RANGE|EXTRA|NEEDARG|CMDWIN|RESTRICT, ADDR_LINES), EX(CMD_pyxfile, "pyxfile", ex_pyxfile, - RANGE|FILE1|NEEDARG|CMDWIN, + RANGE|FILE1|NEEDARG|CMDWIN|RESTRICT, ADDR_LINES), EX(CMD_quit, "quit", ex_quit, BANG|RANGE|COUNT|NOTADR|TRLBAR|CMDWIN, @@ -1203,13 +1204,13 @@ EX(CMD_runtime, "runtime", ex_runtime, BANG|NEEDARG|FILES|TRLBAR|SBOXOK|CMDWIN, ADDR_LINES), EX(CMD_ruby, "ruby", ex_ruby, - RANGE|EXTRA|NEEDARG|CMDWIN, + RANGE|EXTRA|NEEDARG|CMDWIN|RESTRICT, ADDR_LINES), EX(CMD_rubydo, "rubydo", ex_rubydo, - RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN, + RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN|RESTRICT, ADDR_LINES), EX(CMD_rubyfile, "rubyfile", ex_rubyfile, - RANGE|FILE1|NEEDARG|CMDWIN, + RANGE|FILE1|NEEDARG|CMDWIN|RESTRICT, ADDR_LINES), EX(CMD_rundo, "rundo", ex_rundo, NEEDARG|FILE1, @@ -1476,13 +1477,13 @@ EX(CMD_tabs, "tabs", ex_tabs, TRLBAR|CMDWIN, ADDR_TABS), EX(CMD_tcl, "tcl", ex_tcl, - RANGE|EXTRA|NEEDARG|CMDWIN, + RANGE|EXTRA|NEEDARG|CMDWIN|RESTRICT, ADDR_LINES), EX(CMD_tcldo, "tcldo", ex_tcldo, - RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN, + RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN|RESTRICT, ADDR_LINES), EX(CMD_tclfile, "tclfile", ex_tclfile, - RANGE|FILE1|NEEDARG|CMDWIN, + RANGE|FILE1|NEEDARG|CMDWIN|RESTRICT, ADDR_LINES), EX(CMD_tearoff, "tearoff", ex_tearoff, NEEDARG|EXTRA|TRLBAR|NOTRLCOM|CMDWIN, diff --git a/src/version.c b/src/version.c index adb3441..6d29f39 100644 --- a/src/version.c +++ b/src/version.c @@ -809,6 +809,8 @@ static int included_patches[] = 948, /**/ 884, +/**/ + 883, /**/ 881, /**/