diff --git a/scripts/genvimvim.lua b/scripts/genvimvim.lua index 806533f2ff..ccd5489fdc 100644 --- a/scripts/genvimvim.lua +++ b/scripts/genvimvim.lua @@ -55,7 +55,7 @@ end vimcmd_start = 'syn keyword vimCommand contained ' w(vimcmd_start) local prev_cmd = nil -for _, cmd_desc in ipairs(ex_cmds) do +for _, cmd_desc in ipairs(ex_cmds.cmds) do if lld.line_length > 850 then w('\n' .. vimcmd_start) end diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index ae389a6727..9e9b50827e 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -1032,14 +1032,15 @@ void free_prev_shellcmd(void) * Bangs in the argument are replaced with the previously entered command. * Remember the argument. */ -void do_bang(int addr_count, exarg_T *eap, int forceit, int do_in, int do_out) +void do_bang(int addr_count, exarg_T *eap, bool forceit, + bool do_in, bool do_out) + FUNC_ATTR_NONNULL_ALL { - char_u *arg = eap->arg; /* command */ - linenr_T line1 = eap->line1; /* start of range */ - linenr_T line2 = eap->line2; /* end of range */ - char_u *newcmd = NULL; /* the new command */ - int free_newcmd = FALSE; /* need to free() newcmd */ - int ins_prevcmd; + char_u *arg = eap->arg; // command + linenr_T line1 = eap->line1; // start of range + linenr_T line2 = eap->line2; // end of range + char_u *newcmd = NULL; // the new command + bool free_newcmd = false; // need to free() newcmd char_u *t; char_u *p; char_u *trailarg; @@ -1064,7 +1065,7 @@ void do_bang(int addr_count, exarg_T *eap, int forceit, int do_in, int do_out) * Try to find an embedded bang, like in :! ! [args] * (:!! is indicated by the 'forceit' variable) */ - ins_prevcmd = forceit; + bool ins_prevcmd = forceit; trailarg = arg; do { len = (int)STRLEN(trailarg) + 1; @@ -1101,7 +1102,7 @@ void do_bang(int addr_count, exarg_T *eap, int forceit, int do_in, int do_out) else { trailarg = p; *trailarg++ = NUL; - ins_prevcmd = TRUE; + ins_prevcmd = true; break; } } @@ -1131,7 +1132,7 @@ void do_bang(int addr_count, exarg_T *eap, int forceit, int do_in, int do_out) STRCPY(newcmd, p_shq); STRCAT(newcmd, prevcmd); STRCAT(newcmd, p_shq); - free_newcmd = TRUE; + free_newcmd = true; } if (addr_count == 0) { /* :! */ /* echo the command */ @@ -1164,15 +1165,15 @@ void do_bang(int addr_count, exarg_T *eap, int forceit, int do_in, int do_out) // do this. // Alternatively, if on Unix and redirecting input or output, but not both, // and the 'shelltemp' option isn't set, use pipes. -// We use input redirection if do_in is TRUE. -// We use output redirection if do_out is TRUE. +// We use input redirection if do_in is true. +// We use output redirection if do_out is true. static void do_filter( linenr_T line1, linenr_T line2, exarg_T *eap, /* for forced 'ff' and 'fenc' */ char_u *cmd, - int do_in, - int do_out) + bool do_in, + bool do_out) { char_u *itmp = NULL; char_u *otmp = NULL; @@ -1669,10 +1670,17 @@ void ex_update(exarg_T *eap) */ void ex_write(exarg_T *eap) { - if (eap->usefilter) /* input lines to shell command */ - do_bang(1, eap, FALSE, TRUE, FALSE); - else + if (eap->cmdidx == CMD_saveas) { + // :saveas does not take a range, uses all lines. + eap->line1 = 1; + eap->line2 = curbuf->b_ml.ml_line_count; + } + + if (eap->usefilter) { // input lines to shell command + do_bang(1, eap, false, true, false); + } else { (void)do_write(eap); + } } /* diff --git a/src/nvim/ex_cmds.lua b/src/nvim/ex_cmds.lua index 380237c822..1c2a66a0b9 100644 --- a/src/nvim/ex_cmds.lua +++ b/src/nvim/ex_cmds.lua @@ -1,5 +1,7 @@ local bit = require 'bit' +local module = {} + -- Description of the values below is contained in ex_cmds_defs.h file. local RANGE = 0x001 local BANG = 0x002 @@ -15,22 +17,25 @@ local COUNT = 0x400 local NOTRLCOM = 0x800 local ZEROR = 0x1000 local USECTRLV = 0x2000 -local NOTADR = 0x4000 -local EDITCMD = 0x8000 -local BUFNAME = 0x10000 -local BUFUNL = 0x20000 -local ARGOPT = 0x40000 -local SBOXOK = 0x80000 -local CMDWIN = 0x100000 -local MODIFY = 0x200000 -local EXFLAGS = 0x400000 -local RESTRICT = 0x800000 +local EDITCMD = 0x4000 +local BUFNAME = 0x8000 +local BUFUNL = 0x10000 +local ARGOPT = 0x20000 +local SBOXOK = 0x40000 +local CMDWIN = 0x80000 +local MODIFY = 0x100000 +local EXFLAGS = 0x200000 local FILES = bit.bor(XFILE, EXTRA) local WORD1 = bit.bor(EXTRA, NOSPC) local FILE1 = bit.bor(FILES, NOSPC) +module.flags = { + RANGE = RANGE, + DFLALL = DFLALL, +} + -- The following table is described in ex_cmds_defs.h file. -return { +module.cmds = { { command='append', flags=bit.bor(BANG, RANGE, ZEROR, TRLBAR, CMDWIN, MODIFY), @@ -40,246 +45,246 @@ return { { command='abbreviate', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_abbreviate', }, { command='abclear', flags=bit.bor(EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_abclear', }, { command='aboveleft', flags=bit.bor(NEEDARG, EXTRA, NOTRLCOM), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_wrongmodifier', }, { command='all', - flags=bit.bor(BANG, RANGE, NOTADR, COUNT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(BANG, RANGE, COUNT, TRLBAR), + addr_type='ADDR_OTHER', func='ex_all', }, { command='amenu', - flags=bit.bor(RANGE, NOTADR, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), + addr_type='ADDR_OTHER', func='ex_menu', }, { command='anoremenu', - flags=bit.bor(RANGE, NOTADR, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), + addr_type='ADDR_OTHER', func='ex_menu', }, { command='args', flags=bit.bor(BANG, FILES, EDITCMD, ARGOPT, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_args', }, { command='argadd', - flags=bit.bor(BANG, RANGE, NOTADR, ZEROR, FILES, TRLBAR), + flags=bit.bor(BANG, RANGE, ZEROR, FILES, TRLBAR), addr_type='ADDR_ARGUMENTS', func='ex_argadd', }, { command='argdelete', - flags=bit.bor(BANG, RANGE, NOTADR, FILES, TRLBAR), + flags=bit.bor(BANG, RANGE, FILES, TRLBAR), addr_type='ADDR_ARGUMENTS', func='ex_argdelete', }, { command='argdo', - flags=bit.bor(BANG, NEEDARG, EXTRA, NOTRLCOM, RANGE, NOTADR, DFLALL), + flags=bit.bor(BANG, NEEDARG, EXTRA, NOTRLCOM, RANGE, DFLALL), addr_type='ADDR_ARGUMENTS', func='ex_listdo', }, { command='argedit', - flags=bit.bor(BANG, NEEDARG, RANGE, NOTADR, ZEROR, FILES, EDITCMD, ARGOPT, TRLBAR), + flags=bit.bor(BANG, NEEDARG, RANGE, ZEROR, FILES, EDITCMD, ARGOPT, TRLBAR), addr_type='ADDR_ARGUMENTS', func='ex_argedit', }, { command='argglobal', flags=bit.bor(BANG, FILES, EDITCMD, ARGOPT, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_args', }, { command='arglocal', flags=bit.bor(BANG, FILES, EDITCMD, ARGOPT, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_args', }, { command='argument', - flags=bit.bor(BANG, RANGE, NOTADR, COUNT, EXTRA, EDITCMD, ARGOPT, TRLBAR), + flags=bit.bor(BANG, RANGE, COUNT, EXTRA, EDITCMD, ARGOPT, TRLBAR), addr_type='ADDR_ARGUMENTS', func='ex_argument', }, { command='ascii', flags=bit.bor(TRLBAR, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='do_ascii', }, { command='autocmd', flags=bit.bor(BANG, EXTRA, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_autocmd', }, { command='augroup', flags=bit.bor(BANG, WORD1, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_autocmd', }, { command='aunmenu', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_menu', }, { command='buffer', - flags=bit.bor(BANG, RANGE, NOTADR, BUFNAME, BUFUNL, COUNT, EXTRA, EDITCMD, TRLBAR), + flags=bit.bor(BANG, RANGE, BUFNAME, BUFUNL, COUNT, EXTRA, EDITCMD, TRLBAR), addr_type='ADDR_BUFFERS', func='ex_buffer', }, { command='bNext', - flags=bit.bor(BANG, RANGE, NOTADR, COUNT, EDITCMD, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(BANG, RANGE, COUNT, EDITCMD, TRLBAR), + addr_type='ADDR_OTHER', func='ex_bprevious', }, { command='ball', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR), + addr_type='ADDR_OTHER', func='ex_buffer_all', }, { command='badd', flags=bit.bor(NEEDARG, FILE1, EDITCMD, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_edit', }, { command='bdelete', - flags=bit.bor(BANG, RANGE, NOTADR, BUFNAME, COUNT, EXTRA, TRLBAR), + flags=bit.bor(BANG, RANGE, BUFNAME, COUNT, EXTRA, TRLBAR), addr_type='ADDR_BUFFERS', func='ex_bunload', }, { command='behave', flags=bit.bor(NEEDARG, WORD1, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_behave', }, { command='belowright', flags=bit.bor(NEEDARG, EXTRA, NOTRLCOM), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_wrongmodifier', }, { command='bfirst', - flags=bit.bor(BANG, RANGE, NOTADR, EDITCMD, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(BANG, RANGE, EDITCMD, TRLBAR), + addr_type='ADDR_OTHER', func='ex_brewind', }, { command='blast', - flags=bit.bor(BANG, RANGE, NOTADR, EDITCMD, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(BANG, RANGE, EDITCMD, TRLBAR), + addr_type='ADDR_OTHER', func='ex_blast', }, { command='bmodified', - flags=bit.bor(BANG, RANGE, NOTADR, COUNT, EDITCMD, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(BANG, RANGE, COUNT, EDITCMD, TRLBAR), + addr_type='ADDR_OTHER', func='ex_bmodified', }, { command='bnext', - flags=bit.bor(BANG, RANGE, NOTADR, COUNT, EDITCMD, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(BANG, RANGE, COUNT, EDITCMD, TRLBAR), + addr_type='ADDR_OTHER', func='ex_bnext', }, { command='botright', flags=bit.bor(NEEDARG, EXTRA, NOTRLCOM), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_wrongmodifier', }, { command='bprevious', - flags=bit.bor(BANG, RANGE, NOTADR, COUNT, EDITCMD, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(BANG, RANGE, COUNT, EDITCMD, TRLBAR), + addr_type='ADDR_OTHER', func='ex_bprevious', }, { command='brewind', - flags=bit.bor(BANG, RANGE, NOTADR, EDITCMD, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(BANG, RANGE, EDITCMD, TRLBAR), + addr_type='ADDR_OTHER', func='ex_brewind', }, { command='break', flags=bit.bor(TRLBAR, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_break', }, { command='breakadd', flags=bit.bor(EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_breakadd', }, { command='breakdel', flags=bit.bor(EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_breakdel', }, { command='breaklist', flags=bit.bor(EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_breaklist', }, { command='browse', flags=bit.bor(NEEDARG, EXTRA, NOTRLCOM, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_wrongmodifier', }, { command='buffers', flags=bit.bor(BANG, EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='buflist_list', }, { command='bufdo', - flags=bit.bor(BANG, NEEDARG, EXTRA, NOTRLCOM, RANGE, NOTADR, DFLALL), + flags=bit.bor(BANG, NEEDARG, EXTRA, NOTRLCOM, RANGE, DFLALL), addr_type='ADDR_BUFFERS', func='ex_listdo', }, { command='bunload', - flags=bit.bor(BANG, RANGE, NOTADR, BUFNAME, COUNT, EXTRA, TRLBAR), + flags=bit.bor(BANG, RANGE, BUFNAME, COUNT, EXTRA, TRLBAR), addr_type='ADDR_LOADED_BUFFERS', func='ex_bunload', }, { command='bwipeout', - flags=bit.bor(BANG, RANGE, NOTADR, BUFNAME, BUFUNL, COUNT, EXTRA, TRLBAR), + flags=bit.bor(BANG, RANGE, BUFNAME, BUFUNL, COUNT, EXTRA, TRLBAR), addr_type='ADDR_BUFFERS', func='ex_bunload', }, @@ -291,50 +296,50 @@ return { }, { command='cNext', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR, BANG), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR, BANG), + addr_type='ADDR_OTHER', func='ex_cnext', }, { command='cNfile', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR, BANG), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR, BANG), + addr_type='ADDR_OTHER', func='ex_cnext', }, { command='cabbrev', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_abbreviate', }, { command='cabclear', flags=bit.bor(EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_abclear', }, { command='cabove', flags=bit.bor(RANGE, TRLBAR), - addr_type='ADDR_OTHER ', + addr_type='ADDR_OTHER', func='ex_cbelow', }, { command='caddbuffer', - flags=bit.bor(RANGE, NOTADR, WORD1, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, WORD1, TRLBAR), + addr_type='ADDR_OTHER', func='ex_cbuffer', }, { command='caddexpr', flags=bit.bor(NEEDARG, WORD1, NOTRLCOM), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_cexpr', }, { command='caddfile', flags=bit.bor(TRLBAR, FILE1), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_cfile', }, { @@ -346,48 +351,48 @@ return { { command='catch', flags=bit.bor(EXTRA, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_catch', }, { command='cbuffer', - flags=bit.bor(BANG, RANGE, NOTADR, WORD1, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(BANG, RANGE, WORD1, TRLBAR), + addr_type='ADDR_OTHER', func='ex_cbuffer', }, { command='cbelow', flags=bit.bor(RANGE, TRLBAR), - addr_type='ADDR_OTHER ', + addr_type='ADDR_OTHER', func='ex_cbelow', }, { command='cbottom', flags=bit.bor(TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_cbottom', }, { command='cc', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR, BANG), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR, BANG), + addr_type='ADDR_OTHER', func='ex_cc', }, { command='cclose', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(TRLBAR), + addr_type='ADDR_NONE', func='ex_cclose', }, { command='cd', flags=bit.bor(BANG, FILE1, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_cd', }, { command='cdo', - flags=bit.bor(BANG, NEEDARG, EXTRA, NOTRLCOM, RANGE, NOTADR, DFLALL), + flags=bit.bor(BANG, NEEDARG, EXTRA, NOTRLCOM, RANGE, DFLALL), addr_type='ADDR_QUICKFIX', func='ex_listdo', }, @@ -400,159 +405,159 @@ return { { command='cexpr', flags=bit.bor(NEEDARG, WORD1, NOTRLCOM, BANG), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_cexpr', }, { command='cfile', flags=bit.bor(TRLBAR, FILE1, BANG), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_cfile', }, -- Even though 'cfdo' is alphabetically lower than 'cfile', it is after -- 'cfile' in this cmd list to support the existing ":cf" abbreviation. { command='cfdo', - flags=bit.bor(BANG, NEEDARG, EXTRA, NOTRLCOM, RANGE, NOTADR, DFLALL), + flags=bit.bor(BANG, NEEDARG, EXTRA, NOTRLCOM, RANGE, DFLALL), addr_type='ADDR_QUICKFIX', func='ex_listdo', }, { command='cfirst', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR, BANG), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR, BANG), + addr_type='ADDR_OTHER', func='ex_cc', }, { command='cgetfile', flags=bit.bor(TRLBAR, FILE1), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_cfile', }, { command='cgetbuffer', - flags=bit.bor(RANGE, NOTADR, WORD1, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, WORD1, TRLBAR), + addr_type='ADDR_OTHER', func='ex_cbuffer', }, { command='cgetexpr', flags=bit.bor(NEEDARG, WORD1, NOTRLCOM), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_cexpr', }, { command='chdir', flags=bit.bor(BANG, FILE1, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_cd', }, { command='changes', flags=bit.bor(TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_changes', }, { command='checkhealth', flags=bit.bor(EXTRA, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_checkhealth', }, { command='checkpath', flags=bit.bor(TRLBAR, BANG, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_checkpath', }, { command='checktime', - flags=bit.bor(RANGE, NOTADR, BUFNAME, COUNT, EXTRA, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, BUFNAME, COUNT, EXTRA, TRLBAR), + addr_type='ADDR_OTHER', func='ex_checktime', }, { command='chistory', flags=bit.bor(TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='qf_history', }, { command='clist', flags=bit.bor(BANG, EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='qf_list', }, { command='clast', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR, BANG), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR, BANG), + addr_type='ADDR_OTHER', func='ex_cc', }, { command='close', - flags=bit.bor(BANG, RANGE, NOTADR, COUNT, TRLBAR, CMDWIN), + flags=bit.bor(BANG, RANGE, COUNT, TRLBAR, CMDWIN), addr_type='ADDR_WINDOWS', func='ex_close', }, { command='clearjumps', flags=bit.bor(TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_clearjumps', }, { command='cmap', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_map', }, { command='cmapclear', flags=bit.bor(EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_mapclear', }, { command='cmenu', - flags=bit.bor(RANGE, NOTADR, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), + addr_type='ADDR_OTHER', func='ex_menu', }, { command='cnext', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR, BANG), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR, BANG), + addr_type='ADDR_OTHER', func='ex_cnext', }, { command='cnewer', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR), + addr_type='ADDR_OTHER', func='qf_age', }, { command='cnfile', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR, BANG), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR, BANG), + addr_type='ADDR_OTHER', func='ex_cnext', }, { command='cnoremap', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_map', }, { command='cnoreabbrev', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_abbreviate', }, { command='cnoremenu', - flags=bit.bor(RANGE, NOTADR, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), + addr_type='ADDR_OTHER', func='ex_menu', }, { @@ -563,116 +568,116 @@ return { }, { command='colder', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR), + addr_type='ADDR_OTHER', func='qf_age', }, { command='colorscheme', flags=bit.bor(WORD1, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_colorscheme', }, { command='command', flags=bit.bor(EXTRA, BANG, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_command', }, { command='comclear', flags=bit.bor(TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_comclear', }, { command='compiler', flags=bit.bor(BANG, TRLBAR, WORD1, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_compiler', }, { command='continue', flags=bit.bor(TRLBAR, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_continue', }, { command='confirm', flags=bit.bor(NEEDARG, EXTRA, NOTRLCOM, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_wrongmodifier', }, { command='const', flags=bit.bor(NEEDARG, EXTRA, NOTRLCOM, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_const', }, { command='copen', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR), + addr_type='ADDR_OTHER', func='ex_copen', }, { command='cprevious', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR, BANG), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR, BANG), + addr_type='ADDR_OTHER', func='ex_cnext', }, { command='cpfile', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR, BANG), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR, BANG), + addr_type='ADDR_OTHER', func='ex_cnext', }, { command='cquit', - flags=bit.bor(RANGE, NOTADR, COUNT, ZEROR, TRLBAR, BANG), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, ZEROR, TRLBAR, BANG), + addr_type='ADDR_OTHER', func='ex_cquit', }, { command='crewind', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR, BANG), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR, BANG), + addr_type='ADDR_OTHER', func='ex_cc', }, { command='cscope', flags=bit.bor(EXTRA, NOTRLCOM, XFILE), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_cscope', }, { command='cstag', flags=bit.bor(BANG, TRLBAR, WORD1), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_cstag', }, { command='cunmap', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_unmap', }, { command='cunabbrev', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_abbreviate', }, { command='cunmenu', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_menu', }, { command='cwindow', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR), + addr_type='ADDR_OTHER', func='ex_cwindow', }, { @@ -684,43 +689,43 @@ return { { command='delmarks', flags=bit.bor(BANG, EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_delmarks', }, { command='debug', flags=bit.bor(NEEDARG, EXTRA, NOTRLCOM, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_debug', }, { command='debuggreedy', - flags=bit.bor(RANGE, NOTADR, ZEROR, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, ZEROR, TRLBAR, CMDWIN), + addr_type='ADDR_OTHER', func='ex_debuggreedy', }, { command='delcommand', flags=bit.bor(BANG, NEEDARG, WORD1, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_delcommand', }, { command='delfunction', flags=bit.bor(BANG, NEEDARG, WORD1, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_delfunction', }, { command='display', flags=bit.bor(EXTRA, NOTRLCOM, TRLBAR, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_display', }, { command='diffupdate', flags=bit.bor(BANG, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_diffupdate', }, { @@ -732,13 +737,13 @@ return { { command='diffoff', flags=bit.bor(BANG, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_diffoff', }, { command='diffpatch', flags=bit.bor(EXTRA, FILE1, TRLBAR, MODIFY), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_diffpatch', }, { @@ -750,19 +755,19 @@ return { { command='diffsplit', flags=bit.bor(EXTRA, FILE1, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_diffsplit', }, { command='diffthis', flags=bit.bor(TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_diffthis', }, { command='digraphs', flags=bit.bor(BANG, EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_digraphs', }, { @@ -780,19 +785,19 @@ return { { command='doautocmd', flags=bit.bor(EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_doautocmd', }, { command='doautoall', flags=bit.bor(EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_doautoall', }, { command='drop', flags=bit.bor(FILES, EDITCMD, NEEDARG, ARGOPT, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_drop', }, { @@ -810,109 +815,109 @@ return { { command='edit', flags=bit.bor(BANG, FILE1, EDITCMD, ARGOPT, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_edit', }, { command='earlier', flags=bit.bor(TRLBAR, EXTRA, NOSPC, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_later', }, { command='echo', flags=bit.bor(EXTRA, NOTRLCOM, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_echo', }, { command='echoerr', flags=bit.bor(EXTRA, NOTRLCOM, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_execute', }, { command='echohl', flags=bit.bor(EXTRA, TRLBAR, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_echohl', }, { command='echomsg', flags=bit.bor(EXTRA, NOTRLCOM, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_execute', }, { command='echon', flags=bit.bor(EXTRA, NOTRLCOM, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_echo', }, { command='else', flags=bit.bor(TRLBAR, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_else', }, { command='elseif', flags=bit.bor(EXTRA, NOTRLCOM, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_else', }, { command='emenu', - flags=bit.bor(NEEDARG, EXTRA, TRLBAR, NOTRLCOM, RANGE, NOTADR, CMDWIN), - addr_type='ADDR_LINES', + flags=bit.bor(NEEDARG, EXTRA, TRLBAR, NOTRLCOM, RANGE, CMDWIN), + addr_type='ADDR_OTHER', func='ex_emenu', }, { command='endif', flags=bit.bor(TRLBAR, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_endif', }, { command='endfunction', flags=bit.bor(TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_endfunction', }, { command='endfor', flags=bit.bor(TRLBAR, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_endwhile', }, { command='endtry', flags=bit.bor(TRLBAR, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_endtry', }, { command='endwhile', flags=bit.bor(TRLBAR, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_endwhile', }, { command='enew', flags=bit.bor(BANG, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_edit', }, { command='ex', flags=bit.bor(BANG, FILE1, EDITCMD, ARGOPT, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_edit', }, { command='execute', flags=bit.bor(EXTRA, NOTRLCOM, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_execute', }, { @@ -924,55 +929,55 @@ return { { command='exusage', flags=bit.bor(TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_exusage', }, { command='file', - flags=bit.bor(RANGE, NOTADR, ZEROR, BANG, FILE1, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, ZEROR, BANG, FILE1, TRLBAR), + addr_type='ADDR_OTHER', func='ex_file', }, { command='files', flags=bit.bor(BANG, EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='buflist_list', }, { command='filetype', flags=bit.bor(EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_filetype', }, { command='filter', flags=bit.bor(BANG, NEEDARG, EXTRA, NOTRLCOM), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_wrongmodifier', }, { command='find', - flags=bit.bor(RANGE, NOTADR, BANG, FILE1, EDITCMD, ARGOPT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, BANG, FILE1, EDITCMD, ARGOPT, TRLBAR), + addr_type='ADDR_OTHER', func='ex_find', }, { command='finally', flags=bit.bor(TRLBAR, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_finally', }, { command='finish', flags=bit.bor(TRLBAR, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_finish', }, { command='first', flags=bit.bor(EXTRA, BANG, EDITCMD, ARGOPT, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_rewind', }, { @@ -1008,13 +1013,13 @@ return { { command='for', flags=bit.bor(EXTRA, NOTRLCOM, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_while', }, { command='function', flags=bit.bor(EXTRA, BANG, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_function', }, { @@ -1025,56 +1030,56 @@ return { }, { command='goto', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR, SBOXOK, CMDWIN), + addr_type='ADDR_OTHER', func='ex_goto', }, { command='grep', - flags=bit.bor(RANGE, NOTADR, BANG, NEEDARG, EXTRA, NOTRLCOM, TRLBAR, XFILE), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, BANG, NEEDARG, EXTRA, NOTRLCOM, TRLBAR, XFILE), + addr_type='ADDR_OTHER', func='ex_make', }, { command='grepadd', - flags=bit.bor(RANGE, NOTADR, BANG, NEEDARG, EXTRA, NOTRLCOM, TRLBAR, XFILE), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, BANG, NEEDARG, EXTRA, NOTRLCOM, TRLBAR, XFILE), + addr_type='ADDR_OTHER', func='ex_make', }, { command='gui', flags=bit.bor(BANG, FILES, EDITCMD, ARGOPT, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_nogui', }, { command='gvim', flags=bit.bor(BANG, FILES, EDITCMD, ARGOPT, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_nogui', }, { command='help', flags=bit.bor(BANG, EXTRA, NOTRLCOM), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_help', }, { command='helpclose', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR), + addr_type='ADDR_OTHER', func='ex_helpclose', }, { command='helpgrep', flags=bit.bor(EXTRA, NOTRLCOM, NEEDARG), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_helpgrep', }, { command='helptags', flags=bit.bor(NEEDARG, FILES, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_helptags', }, { @@ -1086,19 +1091,19 @@ return { { command='highlight', flags=bit.bor(BANG, EXTRA, TRLBAR, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_highlight', }, { command='hide', - flags=bit.bor(BANG, RANGE, NOTADR, COUNT, EXTRA, TRLBAR), + flags=bit.bor(BANG, RANGE, COUNT, EXTRA, TRLBAR), addr_type='ADDR_WINDOWS', func='ex_hide', }, { command='history', flags=bit.bor(EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_history', }, { @@ -1110,19 +1115,19 @@ return { { command='iabbrev', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_abbreviate', }, { command='iabclear', flags=bit.bor(EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_abclear', }, { command='if', flags=bit.bor(EXTRA, NOTRLCOM, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_if', }, { @@ -1140,43 +1145,43 @@ return { { command='imap', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_map', }, { command='imapclear', flags=bit.bor(EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_mapclear', }, { command='imenu', - flags=bit.bor(RANGE, NOTADR, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), + addr_type='ADDR_OTHER', func='ex_menu', }, { command='inoremap', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_map', }, { command='inoreabbrev', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_abbreviate', }, { command='inoremenu', - flags=bit.bor(RANGE, NOTADR, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), + addr_type='ADDR_OTHER', func='ex_menu', }, { command='intro', flags=bit.bor(TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_intro', }, { @@ -1194,19 +1199,19 @@ return { { command='iunmap', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_unmap', }, { command='iunabbrev', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_abbreviate', }, { command='iunmenu', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_menu', }, { @@ -1218,7 +1223,7 @@ return { { command='jumps', flags=bit.bor(TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_jumps', }, { @@ -1230,25 +1235,25 @@ return { { command='keepmarks', flags=bit.bor(NEEDARG, EXTRA, NOTRLCOM), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_wrongmodifier', }, { command='keepjumps', flags=bit.bor(NEEDARG, EXTRA, NOTRLCOM), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_wrongmodifier', }, { command='keeppatterns', flags=bit.bor(NEEDARG, EXTRA, NOTRLCOM), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_wrongmodifier', }, { command='keepalt', flags=bit.bor(NEEDARG, EXTRA, NOTRLCOM), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_wrongmodifier', }, { @@ -1259,103 +1264,103 @@ return { }, { command='lNext', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR, BANG), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR, BANG), + addr_type='ADDR_OTHER', func='ex_cnext', }, { command='lNfile', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR, BANG), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR, BANG), + addr_type='ADDR_OTHER', func='ex_cnext', }, { command='last', flags=bit.bor(EXTRA, BANG, EDITCMD, ARGOPT, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_last', }, { command='labove', flags=bit.bor(RANGE, TRLBAR), - addr_type='ADDR_OTHER ', + addr_type='ADDR_OTHER', func='ex_cbelow', }, { command='language', flags=bit.bor(EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_language', }, { command='laddexpr', flags=bit.bor(NEEDARG, WORD1, NOTRLCOM), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_cexpr', }, { command='laddbuffer', - flags=bit.bor(RANGE, NOTADR, WORD1, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, WORD1, TRLBAR), + addr_type='ADDR_OTHER', func='ex_cbuffer', }, { command='laddfile', flags=bit.bor(TRLBAR, FILE1), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_cfile', }, { command='later', flags=bit.bor(TRLBAR, EXTRA, NOSPC, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_later', }, { command='lbuffer', - flags=bit.bor(BANG, RANGE, NOTADR, WORD1, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(BANG, RANGE, WORD1, TRLBAR), + addr_type='ADDR_OTHER', func='ex_cbuffer', }, { command='lbelow', flags=bit.bor(RANGE, TRLBAR), - addr_type='ADDR_OTHER ', + addr_type='ADDR_OTHER', func='ex_cbelow', }, { command='lbottom', flags=bit.bor(TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_cbottom', }, { command='lcd', flags=bit.bor(BANG, FILE1, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_cd', }, { command='lchdir', flags=bit.bor(BANG, FILE1, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_cd', }, { command='lclose', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR), + addr_type='ADDR_OTHER', func='ex_cclose', }, { command='lcscope', flags=bit.bor(EXTRA, NOTRLCOM, XFILE), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_cscope', }, { command='ldo', - flags=bit.bor(BANG, NEEDARG, EXTRA, NOTRLCOM, RANGE, NOTADR, DFLALL), + flags=bit.bor(BANG, NEEDARG, EXTRA, NOTRLCOM, RANGE, DFLALL), addr_type='ADDR_QUICKFIX', func='ex_listdo', }, @@ -1368,249 +1373,249 @@ return { { command='leftabove', flags=bit.bor(NEEDARG, EXTRA, NOTRLCOM), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_wrongmodifier', }, { command='let', flags=bit.bor(EXTRA, NOTRLCOM, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_let', }, { command='lexpr', flags=bit.bor(NEEDARG, WORD1, NOTRLCOM, BANG), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_cexpr', }, { command='lfile', flags=bit.bor(TRLBAR, FILE1, BANG), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_cfile', }, -- Even though 'lfdo' is alphabetically lower than 'lfile', it is after -- 'lfile' in this cmd list to support the existing ":lf" abbreviation. { command='lfdo', - flags=bit.bor(BANG, NEEDARG, EXTRA, NOTRLCOM, RANGE, NOTADR, DFLALL), + flags=bit.bor(BANG, NEEDARG, EXTRA, NOTRLCOM, RANGE, DFLALL), addr_type='ADDR_QUICKFIX', func='ex_listdo', }, { command='lfirst', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR, BANG), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR, BANG), + addr_type='ADDR_OTHER', func='ex_cc', }, { command='lgetfile', flags=bit.bor(TRLBAR, FILE1), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_cfile', }, { command='lgetbuffer', - flags=bit.bor(RANGE, NOTADR, WORD1, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, WORD1, TRLBAR), + addr_type='ADDR_OTHER', func='ex_cbuffer', }, { command='lgetexpr', flags=bit.bor(NEEDARG, WORD1, NOTRLCOM), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_cexpr', }, { command='lgrep', - flags=bit.bor(RANGE, NOTADR, BANG, NEEDARG, EXTRA, NOTRLCOM, TRLBAR, XFILE), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, BANG, NEEDARG, EXTRA, NOTRLCOM, TRLBAR, XFILE), + addr_type='ADDR_OTHER', func='ex_make', }, { command='lgrepadd', - flags=bit.bor(RANGE, NOTADR, BANG, NEEDARG, EXTRA, NOTRLCOM, TRLBAR, XFILE), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, BANG, NEEDARG, EXTRA, NOTRLCOM, TRLBAR, XFILE), + addr_type='ADDR_OTHER', func='ex_make', }, { command='lhelpgrep', flags=bit.bor(EXTRA, NOTRLCOM, NEEDARG), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_helpgrep', }, { command='lhistory', flags=bit.bor(TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='qf_history', }, { command='ll', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR, BANG), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR, BANG), + addr_type='ADDR_OTHER', func='ex_cc', }, { command='llast', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR, BANG), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR, BANG), + addr_type='ADDR_OTHER', func='ex_cc', }, { command='llist', flags=bit.bor(BANG, EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='qf_list', }, { command='lmap', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_map', }, { command='lmapclear', flags=bit.bor(EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_mapclear', }, { command='lmake', flags=bit.bor(BANG, EXTRA, NOTRLCOM, TRLBAR, XFILE), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_make', }, { command='lnoremap', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_map', }, { command='lnext', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR, BANG), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR, BANG), + addr_type='ADDR_OTHER', func='ex_cnext', }, { command='lnewer', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR), + addr_type='ADDR_OTHER', func='qf_age', }, { command='lnfile', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR, BANG), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR, BANG), + addr_type='ADDR_OTHER', func='ex_cnext', }, { command='loadview', flags=bit.bor(FILE1, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_loadview', }, { command='loadkeymap', flags=bit.bor(CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_loadkeymap', }, { command='lockmarks', flags=bit.bor(NEEDARG, EXTRA, NOTRLCOM), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_wrongmodifier', }, { command='lockvar', flags=bit.bor(BANG, EXTRA, NEEDARG, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_lockvar', }, { command='lolder', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR), + addr_type='ADDR_OTHER', func='qf_age', }, { command='lopen', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR), + addr_type='ADDR_OTHER', func='ex_copen', }, { command='lprevious', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR, BANG), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR, BANG), + addr_type='ADDR_OTHER', func='ex_cnext', }, { command='lpfile', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR, BANG), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR, BANG), + addr_type='ADDR_OTHER', func='ex_cnext', }, { command='lrewind', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR, BANG), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR, BANG), + addr_type='ADDR_OTHER', func='ex_cc', }, { command='ltag', - flags=bit.bor(NOTADR, TRLBAR, BANG, WORD1), - addr_type='ADDR_LINES', + flags=bit.bor(TRLBAR, BANG, WORD1), + addr_type='ADDR_NONE', func='ex_tag', }, { command='lunmap', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_unmap', }, { command='lua', - flags=bit.bor(RANGE, EXTRA, NEEDARG, CMDWIN, RESTRICT), + flags=bit.bor(RANGE, EXTRA, NEEDARG, CMDWIN), addr_type='ADDR_LINES', func='ex_lua', }, { command='luado', - flags=bit.bor(RANGE, DFLALL, EXTRA, NEEDARG, CMDWIN, RESTRICT), + flags=bit.bor(RANGE, DFLALL, EXTRA, NEEDARG, CMDWIN), addr_type='ADDR_LINES', func='ex_luado', }, { command='luafile', - flags=bit.bor(RANGE, FILE1, NEEDARG, CMDWIN, RESTRICT), + flags=bit.bor(RANGE, FILE1, NEEDARG, CMDWIN), addr_type='ADDR_LINES', func='ex_luafile', }, { command='lvimgrep', - flags=bit.bor(RANGE, NOTADR, BANG, NEEDARG, EXTRA, NOTRLCOM, TRLBAR, XFILE), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, BANG, NEEDARG, EXTRA, NOTRLCOM, TRLBAR, XFILE), + addr_type='ADDR_OTHER', func='ex_vimgrep', }, { command='lvimgrepadd', - flags=bit.bor(RANGE, NOTADR, BANG, NEEDARG, EXTRA, NOTRLCOM, TRLBAR, XFILE), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, BANG, NEEDARG, EXTRA, NOTRLCOM, TRLBAR, XFILE), + addr_type='ADDR_OTHER', func='ex_vimgrep', }, { command='lwindow', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR), + addr_type='ADDR_OTHER', func='ex_cwindow', }, { command='ls', flags=bit.bor(BANG, EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='buflist_list', }, { @@ -1628,43 +1633,43 @@ return { { command='make', flags=bit.bor(BANG, EXTRA, NOTRLCOM, TRLBAR, XFILE), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_make', }, { command='map', flags=bit.bor(BANG, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_map', }, { command='mapclear', flags=bit.bor(EXTRA, BANG, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_mapclear', }, { command='marks', flags=bit.bor(EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_marks', }, { command='match', - flags=bit.bor(RANGE, NOTADR, EXTRA, CMDWIN), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, EXTRA, CMDWIN), + addr_type='ADDR_OTHER', func='ex_match', }, { command='menu', - flags=bit.bor(RANGE, NOTADR, ZEROR, BANG, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, ZEROR, BANG, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), + addr_type='ADDR_OTHER', func='ex_menu', }, { command='menutranslate', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_menutranslate', }, { @@ -1676,37 +1681,37 @@ return { { command='mkexrc', flags=bit.bor(BANG, FILE1, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_mkrc', }, { command='mksession', flags=bit.bor(BANG, FILE1, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_mkrc', }, { command='mkspell', flags=bit.bor(BANG, NEEDARG, EXTRA, NOTRLCOM, TRLBAR, XFILE), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_mkspell', }, { command='mkvimrc', flags=bit.bor(BANG, FILE1, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_mkrc', }, { command='mkview', flags=bit.bor(BANG, FILE1, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_mkrc', }, { command='mode', flags=bit.bor(WORD1, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_mode', }, { @@ -1723,80 +1728,80 @@ return { }, { command='next', - flags=bit.bor(RANGE, NOTADR, BANG, FILES, EDITCMD, ARGOPT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, BANG, FILES, EDITCMD, ARGOPT, TRLBAR), + addr_type='ADDR_OTHER', func='ex_next', }, { command='new', - flags=bit.bor(BANG, FILE1, RANGE, NOTADR, EDITCMD, ARGOPT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(BANG, FILE1, RANGE, EDITCMD, ARGOPT, TRLBAR), + addr_type='ADDR_OTHER', func='ex_splitview', }, { command='nmap', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_map', }, { command='nmapclear', flags=bit.bor(EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_mapclear', }, { command='nmenu', - flags=bit.bor(RANGE, NOTADR, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), + addr_type='ADDR_OTHER', func='ex_menu', }, { command='nnoremap', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_map', }, { command='nnoremenu', - flags=bit.bor(RANGE, NOTADR, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), + addr_type='ADDR_OTHER', func='ex_menu', }, { command='noremap', flags=bit.bor(BANG, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_map', }, { command='noautocmd', flags=bit.bor(NEEDARG, EXTRA, NOTRLCOM), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_wrongmodifier', }, { command='nohlsearch', flags=bit.bor(TRLBAR, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_nohlsearch', }, { command='noreabbrev', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_abbreviate', }, { command='noremenu', - flags=bit.bor(RANGE, NOTADR, ZEROR, BANG, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, ZEROR, BANG, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), + addr_type='ADDR_OTHER', func='ex_menu', }, { command='noswapfile', flags=bit.bor(NEEDARG, EXTRA, NOTRLCOM), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_wrongmodifier', }, { @@ -1814,79 +1819,79 @@ return { { command='nunmap', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_unmap', }, { command='nunmenu', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_menu', }, { command='oldfiles', flags=bit.bor(BANG, TRLBAR, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_oldfiles', }, { command='omap', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_map', }, { command='omapclear', flags=bit.bor(EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_mapclear', }, { command='omenu', - flags=bit.bor(RANGE, NOTADR, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), + addr_type='ADDR_OTHER', func='ex_menu', }, { command='only', - flags=bit.bor(BANG, NOTADR, RANGE, COUNT, TRLBAR), + flags=bit.bor(BANG, RANGE, COUNT, TRLBAR), addr_type='ADDR_WINDOWS', func='ex_only', }, { command='onoremap', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_map', }, { command='onoremenu', - flags=bit.bor(RANGE, NOTADR, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), + addr_type='ADDR_OTHER', func='ex_menu', }, { command='options', flags=bit.bor(TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_options', }, { command='ounmap', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_unmap', }, { command='ounmenu', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_menu', }, { command='ownsyntax', flags=bit.bor(EXTRA, NOTRLCOM, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_ownsyntax', }, { @@ -1898,85 +1903,85 @@ return { { command='packadd', flags=bit.bor(BANG, FILE1, NEEDARG, TRLBAR, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_packadd', }, { command='packloadall', flags=bit.bor(BANG, TRLBAR, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_packloadall', }, { command='pclose', flags=bit.bor(BANG, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_pclose', }, { command='perl', - flags=bit.bor(RANGE, EXTRA, DFLALL, NEEDARG, SBOXOK, CMDWIN, RESTRICT), + flags=bit.bor(RANGE, EXTRA, DFLALL, NEEDARG, SBOXOK, CMDWIN), addr_type='ADDR_LINES', func='ex_perl', }, { command='perldo', - flags=bit.bor(RANGE, EXTRA, DFLALL, NEEDARG, CMDWIN, RESTRICT), + flags=bit.bor(RANGE, EXTRA, DFLALL, NEEDARG, CMDWIN), addr_type='ADDR_LINES', func='ex_perldo', }, { command='perlfile', - flags=bit.bor(RANGE, FILE1, NEEDARG, CMDWIN, RESTRICT), + flags=bit.bor(RANGE, FILE1, NEEDARG, CMDWIN), addr_type='ADDR_LINES', func='ex_perlfile', }, { command='pedit', flags=bit.bor(BANG, FILE1, EDITCMD, ARGOPT, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_pedit', }, { command='pop', - flags=bit.bor(RANGE, NOTADR, BANG, COUNT, TRLBAR, ZEROR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, BANG, COUNT, TRLBAR, ZEROR), + addr_type='ADDR_OTHER', func='ex_tag', }, { command='popup', flags=bit.bor(NEEDARG, EXTRA, BANG, TRLBAR, NOTRLCOM, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_ni', }, { command='ppop', - flags=bit.bor(RANGE, NOTADR, BANG, COUNT, TRLBAR, ZEROR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, BANG, COUNT, TRLBAR, ZEROR), + addr_type='ADDR_OTHER', func='ex_ptag', }, { command='preserve', flags=bit.bor(TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_preserve', }, { command='previous', - flags=bit.bor(EXTRA, RANGE, NOTADR, COUNT, BANG, EDITCMD, ARGOPT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(EXTRA, RANGE, COUNT, BANG, EDITCMD, ARGOPT, TRLBAR), + addr_type='ADDR_OTHER', func='ex_previous', }, { command='profile', flags=bit.bor(BANG, EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_profile', }, { command='profdel', flags=bit.bor(EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_breakdel', }, { @@ -1987,56 +1992,56 @@ return { }, { command='ptag', - flags=bit.bor(RANGE, NOTADR, BANG, WORD1, TRLBAR, ZEROR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, BANG, WORD1, TRLBAR, ZEROR), + addr_type='ADDR_OTHER', func='ex_ptag', }, { command='ptNext', - flags=bit.bor(RANGE, NOTADR, BANG, TRLBAR, ZEROR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, BANG, TRLBAR, ZEROR), + addr_type='ADDR_OTHER', func='ex_ptag', }, { command='ptfirst', - flags=bit.bor(RANGE, NOTADR, BANG, TRLBAR, ZEROR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, BANG, TRLBAR, ZEROR), + addr_type='ADDR_OTHER', func='ex_ptag', }, { command='ptjump', flags=bit.bor(BANG, TRLBAR, WORD1), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_ptag', }, { command='ptlast', flags=bit.bor(BANG, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_ptag', }, { command='ptnext', - flags=bit.bor(RANGE, NOTADR, BANG, TRLBAR, ZEROR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, BANG, TRLBAR, ZEROR), + addr_type='ADDR_OTHER', func='ex_ptag', }, { command='ptprevious', - flags=bit.bor(RANGE, NOTADR, BANG, TRLBAR, ZEROR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, BANG, TRLBAR, ZEROR), + addr_type='ADDR_OTHER', func='ex_ptag', }, { command='ptrewind', - flags=bit.bor(RANGE, NOTADR, BANG, TRLBAR, ZEROR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, BANG, TRLBAR, ZEROR), + addr_type='ADDR_OTHER', func='ex_ptag', }, { command='ptselect', flags=bit.bor(BANG, TRLBAR, WORD1), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_ptag', }, { @@ -2048,91 +2053,91 @@ return { { command='pwd', flags=bit.bor(TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_pwd', }, { command='python', - flags=bit.bor(RANGE, EXTRA, NEEDARG, CMDWIN, RESTRICT), + flags=bit.bor(RANGE, EXTRA, NEEDARG, CMDWIN), addr_type='ADDR_LINES', func='ex_python', }, { command='pydo', - flags=bit.bor(RANGE, DFLALL, EXTRA, NEEDARG, CMDWIN, RESTRICT), + flags=bit.bor(RANGE, DFLALL, EXTRA, NEEDARG, CMDWIN), addr_type='ADDR_LINES', func='ex_pydo', }, { command='pyfile', - flags=bit.bor(RANGE, FILE1, NEEDARG, CMDWIN, RESTRICT), + flags=bit.bor(RANGE, FILE1, NEEDARG, CMDWIN), addr_type='ADDR_LINES', func='ex_pyfile', }, { command='py3', - flags=bit.bor(RANGE, EXTRA, NEEDARG, CMDWIN, RESTRICT), + flags=bit.bor(RANGE, EXTRA, NEEDARG, CMDWIN), addr_type='ADDR_LINES', func='ex_python3', }, { command='py3do', - flags=bit.bor(RANGE, DFLALL, EXTRA, NEEDARG, CMDWIN, RESTRICT), + flags=bit.bor(RANGE, DFLALL, EXTRA, NEEDARG, CMDWIN), addr_type='ADDR_LINES', func='ex_pydo3', }, { command='python3', - flags=bit.bor(RANGE, EXTRA, NEEDARG, CMDWIN, RESTRICT), + flags=bit.bor(RANGE, EXTRA, NEEDARG, CMDWIN), addr_type='ADDR_LINES', func='ex_python3', }, { command='py3file', - flags=bit.bor(RANGE, FILE1, NEEDARG, CMDWIN, RESTRICT), + flags=bit.bor(RANGE, FILE1, NEEDARG, CMDWIN), addr_type='ADDR_LINES', func='ex_py3file', }, { command='pyx', - flags=bit.bor(RANGE, EXTRA, NEEDARG, CMDWIN, RESTRICT), + flags=bit.bor(RANGE, EXTRA, NEEDARG, CMDWIN), addr_type='ADDR_LINES', func='ex_pyx', }, { command='pyxdo', - flags=bit.bor(RANGE, DFLALL, EXTRA, NEEDARG, CMDWIN, RESTRICT), + flags=bit.bor(RANGE, DFLALL, EXTRA, NEEDARG, CMDWIN), addr_type='ADDR_LINES', func='ex_pyxdo', }, { command='pythonx', - flags=bit.bor(RANGE, EXTRA, NEEDARG, CMDWIN, RESTRICT), + flags=bit.bor(RANGE, EXTRA, NEEDARG, CMDWIN), addr_type='ADDR_LINES', func='ex_pyx', }, { command='pyxfile', - flags=bit.bor(RANGE, FILE1, NEEDARG, CMDWIN, RESTRICT), + flags=bit.bor(RANGE, FILE1, NEEDARG, CMDWIN), addr_type='ADDR_LINES', func='ex_pyxfile', }, { command='quit', - flags=bit.bor(BANG, RANGE, COUNT, NOTADR, TRLBAR, CMDWIN), + flags=bit.bor(BANG, RANGE, COUNT, TRLBAR, CMDWIN), addr_type='ADDR_WINDOWS', func='ex_quit', }, { command='quitall', flags=bit.bor(BANG, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_quit_all', }, { command='qall', flags=bit.bor(BANG, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_quit_all', }, { @@ -2144,49 +2149,49 @@ return { { command='recover', flags=bit.bor(BANG, FILE1, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_recover', }, { command='redo', flags=bit.bor(TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_redo', }, { command='redir', flags=bit.bor(BANG, FILES, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_redir', }, { command='redraw', flags=bit.bor(BANG, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_redraw', }, { command='redrawstatus', flags=bit.bor(BANG, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_redrawstatus', }, { command='redrawtabline', flags=bit.bor(TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_redrawtabline', }, { command='registers', flags=bit.bor(EXTRA, NOTRLCOM, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_display', }, { command='resize', - flags=bit.bor(RANGE, NOTADR, TRLBAR, WORD1, CMDWIN), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, TRLBAR, WORD1, CMDWIN), + addr_type='ADDR_OTHER', func='ex_resize', }, { @@ -2198,13 +2203,13 @@ return { { command='return', flags=bit.bor(EXTRA, NOTRLCOM, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_return', }, { command='rewind', flags=bit.bor(EXTRA, BANG, EDITCMD, ARGOPT, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_rewind', }, { @@ -2216,49 +2221,49 @@ return { { command='rightbelow', flags=bit.bor(NEEDARG, EXTRA, NOTRLCOM), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_wrongmodifier', }, { command='rshada', flags=bit.bor(BANG, FILE1, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_shada', }, { command='runtime', flags=bit.bor(BANG, NEEDARG, FILES, TRLBAR, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_runtime', }, { command='rundo', flags=bit.bor(NEEDARG, FILE1), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_rundo', }, { command='ruby', - flags=bit.bor(RANGE, EXTRA, NEEDARG, CMDWIN, RESTRICT), + flags=bit.bor(RANGE, EXTRA, NEEDARG, CMDWIN), addr_type='ADDR_LINES', func='ex_ruby', }, { command='rubydo', - flags=bit.bor(RANGE, DFLALL, EXTRA, NEEDARG, CMDWIN, RESTRICT), + flags=bit.bor(RANGE, DFLALL, EXTRA, NEEDARG, CMDWIN), addr_type='ADDR_LINES', func='ex_rubydo', }, { command='rubyfile', - flags=bit.bor(RANGE, FILE1, NEEDARG, CMDWIN, RESTRICT), + flags=bit.bor(RANGE, FILE1, NEEDARG, CMDWIN), addr_type='ADDR_LINES', func='ex_rubyfile', }, { command='rviminfo', flags=bit.bor(BANG, FILE1, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_shada', }, { @@ -2269,170 +2274,170 @@ return { }, { command='sNext', - flags=bit.bor(EXTRA, RANGE, NOTADR, COUNT, BANG, EDITCMD, ARGOPT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(EXTRA, RANGE, COUNT, BANG, EDITCMD, ARGOPT, TRLBAR), + addr_type='ADDR_OTHER', func='ex_previous', }, { command='sargument', - flags=bit.bor(BANG, RANGE, NOTADR, COUNT, EXTRA, EDITCMD, ARGOPT, TRLBAR), + flags=bit.bor(BANG, RANGE, COUNT, EXTRA, EDITCMD, ARGOPT, TRLBAR), addr_type='ADDR_ARGUMENTS', func='ex_argument', }, { command='sall', - flags=bit.bor(BANG, RANGE, NOTADR, COUNT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(BANG, RANGE, COUNT, TRLBAR), + addr_type='ADDR_OTHER', func='ex_all', }, { command='sandbox', flags=bit.bor(NEEDARG, EXTRA, NOTRLCOM), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_wrongmodifier', }, { command='saveas', - flags=bit.bor(BANG, DFLALL, FILE1, ARGOPT, CMDWIN, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(BANG, FILE1, ARGOPT, CMDWIN, TRLBAR), + addr_type='ADDR_NONE', func='ex_write', }, { command='sbuffer', - flags=bit.bor(BANG, RANGE, NOTADR, BUFNAME, BUFUNL, COUNT, EXTRA, EDITCMD, TRLBAR), + flags=bit.bor(BANG, RANGE, BUFNAME, BUFUNL, COUNT, EXTRA, EDITCMD, TRLBAR), addr_type='ADDR_BUFFERS', func='ex_buffer', }, { command='sbNext', - flags=bit.bor(RANGE, NOTADR, COUNT, EDITCMD, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, EDITCMD, TRLBAR), + addr_type='ADDR_OTHER', func='ex_bprevious', }, { command='sball', - flags=bit.bor(RANGE, NOTADR, COUNT, EDITCMD, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, EDITCMD, TRLBAR), + addr_type='ADDR_OTHER', func='ex_buffer_all', }, { command='sbfirst', flags=bit.bor(EDITCMD, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_brewind', }, { command='sblast', flags=bit.bor(EDITCMD, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_blast', }, { command='sbmodified', - flags=bit.bor(RANGE, NOTADR, COUNT, EDITCMD, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, EDITCMD, TRLBAR), + addr_type='ADDR_OTHER', func='ex_bmodified', }, { command='sbnext', - flags=bit.bor(RANGE, NOTADR, COUNT, EDITCMD, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, EDITCMD, TRLBAR), + addr_type='ADDR_OTHER', func='ex_bnext', }, { command='sbprevious', - flags=bit.bor(RANGE, NOTADR, COUNT, EDITCMD, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, EDITCMD, TRLBAR), + addr_type='ADDR_OTHER', func='ex_bprevious', }, { command='sbrewind', flags=bit.bor(EDITCMD, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_brewind', }, { command='scriptnames', - flags=bit.bor(BANG, RANGE, NOTADR, COUNT, TRLBAR, CMDWIN), + flags=bit.bor(BANG, RANGE, COUNT, TRLBAR, CMDWIN), addr_type='ADDR_OTHER', func='ex_scriptnames', }, { command='scriptencoding', flags=bit.bor(WORD1, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_scriptencoding', }, { command='scscope', flags=bit.bor(EXTRA, NOTRLCOM), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_scscope', }, { command='set', flags=bit.bor(TRLBAR, EXTRA, CMDWIN, SBOXOK), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_set', }, { command='setfiletype', flags=bit.bor(TRLBAR, EXTRA, NEEDARG, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_setfiletype', }, { command='setglobal', flags=bit.bor(TRLBAR, EXTRA, CMDWIN, SBOXOK), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_set', }, { command='setlocal', flags=bit.bor(TRLBAR, EXTRA, CMDWIN, SBOXOK), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_set', }, { command='sfind', - flags=bit.bor(BANG, FILE1, RANGE, NOTADR, EDITCMD, ARGOPT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(BANG, FILE1, RANGE, EDITCMD, ARGOPT, TRLBAR), + addr_type='ADDR_OTHER', func='ex_splitview', }, { command='sfirst', flags=bit.bor(EXTRA, BANG, EDITCMD, ARGOPT, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_rewind', }, { command='simalt', flags=bit.bor(NEEDARG, WORD1, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_ni', }, { command='sign', - flags=bit.bor(NEEDARG, RANGE, NOTADR, EXTRA, CMDWIN), - addr_type='ADDR_LINES', + flags=bit.bor(NEEDARG, RANGE, EXTRA, CMDWIN), + addr_type='ADDR_OTHER', func='ex_sign', }, { command='silent', flags=bit.bor(NEEDARG, EXTRA, BANG, NOTRLCOM, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_wrongmodifier', }, { command='sleep', - flags=bit.bor(RANGE, NOTADR, COUNT, EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, EXTRA, TRLBAR, CMDWIN), + addr_type='ADDR_OTHER', func='ex_sleep', }, { command='slast', flags=bit.bor(EXTRA, BANG, EDITCMD, ARGOPT, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_last', }, { @@ -2444,25 +2449,25 @@ return { { command='smap', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_map', }, { command='smapclear', flags=bit.bor(EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_mapclear', }, { command='smenu', - flags=bit.bor(RANGE, NOTADR, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), + addr_type='ADDR_OTHER', func='ex_menu', }, { command='snext', - flags=bit.bor(RANGE, NOTADR, BANG, FILES, EDITCMD, ARGOPT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, BANG, FILES, EDITCMD, ARGOPT, TRLBAR), + addr_type='ADDR_OTHER', func='ex_next', }, { @@ -2474,19 +2479,19 @@ return { { command='snoremap', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_map', }, { command='snoremenu', - flags=bit.bor(RANGE, NOTADR, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), + addr_type='ADDR_OTHER', func='ex_menu', }, { command='source', flags=bit.bor(BANG, FILE1, TRLBAR, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_source', }, { @@ -2497,158 +2502,158 @@ return { }, { command='split', - flags=bit.bor(BANG, FILE1, RANGE, NOTADR, EDITCMD, ARGOPT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(BANG, FILE1, RANGE, EDITCMD, ARGOPT, TRLBAR), + addr_type='ADDR_OTHER', func='ex_splitview', }, { command='spellgood', - flags=bit.bor(BANG, RANGE, NOTADR, NEEDARG, EXTRA, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(BANG, RANGE, NEEDARG, EXTRA, TRLBAR), + addr_type='ADDR_OTHER', func='ex_spell', }, { command='spelldump', flags=bit.bor(BANG, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_spelldump', }, { command='spellinfo', flags=bit.bor(TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_spellinfo', }, { command='spellrepall', flags=bit.bor(TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_spellrepall', }, { command='spellundo', - flags=bit.bor(BANG, RANGE, NOTADR, NEEDARG, EXTRA, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(BANG, RANGE, NEEDARG, EXTRA, TRLBAR), + addr_type='ADDR_OTHER', func='ex_spell', }, { command='spellwrong', - flags=bit.bor(BANG, RANGE, NOTADR, NEEDARG, EXTRA, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(BANG, RANGE, NEEDARG, EXTRA, TRLBAR), + addr_type='ADDR_OTHER', func='ex_spell', }, { command='sprevious', - flags=bit.bor(EXTRA, RANGE, NOTADR, COUNT, BANG, EDITCMD, ARGOPT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(EXTRA, RANGE, COUNT, BANG, EDITCMD, ARGOPT, TRLBAR), + addr_type='ADDR_OTHER', func='ex_previous', }, { command='srewind', flags=bit.bor(EXTRA, BANG, EDITCMD, ARGOPT, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_rewind', }, { command='stop', flags=bit.bor(TRLBAR, BANG, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_stop', }, { command='stag', - flags=bit.bor(RANGE, NOTADR, BANG, WORD1, TRLBAR, ZEROR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, BANG, WORD1, TRLBAR, ZEROR), + addr_type='ADDR_OTHER', func='ex_stag', }, { command='startinsert', flags=bit.bor(BANG, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_startinsert', }, { command='startgreplace', flags=bit.bor(BANG, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_startinsert', }, { command='startreplace', flags=bit.bor(BANG, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_startinsert', }, { command='stopinsert', flags=bit.bor(BANG, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_stopinsert', }, { command='stjump', flags=bit.bor(BANG, TRLBAR, WORD1), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_stag', }, { command='stselect', flags=bit.bor(BANG, TRLBAR, WORD1), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_stag', }, { command='sunhide', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR), + addr_type='ADDR_OTHER', func='ex_buffer_all', }, { command='sunmap', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_unmap', }, { command='sunmenu', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_menu', }, { command='suspend', flags=bit.bor(TRLBAR, BANG, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_stop', }, { command='sview', - flags=bit.bor(BANG, FILE1, RANGE, NOTADR, EDITCMD, ARGOPT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(BANG, FILE1, RANGE, EDITCMD, ARGOPT, TRLBAR), + addr_type='ADDR_OTHER', func='ex_splitview', }, { command='swapname', flags=bit.bor(TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_swapname', }, { command='syntax', flags=bit.bor(EXTRA, NOTRLCOM, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_syntax', }, { command='syntime', flags=bit.bor(NEEDARG, WORD1, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_syntime', }, { command='syncbind', flags=bit.bor(TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_syncbind', }, { @@ -2660,121 +2665,121 @@ return { { command='tcd', flags=bit.bor(BANG, FILE1, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_cd', }, { command='tchdir', flags=bit.bor(BANG, FILE1, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_cd', }, { command='tNext', - flags=bit.bor(RANGE, NOTADR, BANG, TRLBAR, ZEROR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, BANG, TRLBAR, ZEROR), + addr_type='ADDR_OTHER', func='ex_tag', }, { command='tag', - flags=bit.bor(RANGE, NOTADR, BANG, WORD1, TRLBAR, ZEROR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, BANG, WORD1, TRLBAR, ZEROR), + addr_type='ADDR_OTHER', func='ex_tag', }, { command='tags', flags=bit.bor(TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='do_tags', }, { command='tab', flags=bit.bor(NEEDARG, EXTRA, NOTRLCOM), - addr_type='ADDR_TABS', + addr_type='ADDR_NONE', func='ex_wrongmodifier', }, { command='tabclose', - flags=bit.bor(BANG, RANGE, NOTADR, ZEROR, EXTRA, NOSPC, TRLBAR, CMDWIN), + flags=bit.bor(BANG, RANGE, ZEROR, EXTRA, NOSPC, TRLBAR, CMDWIN), addr_type='ADDR_TABS', func='ex_tabclose', }, { command='tabdo', - flags=bit.bor(NEEDARG, EXTRA, NOTRLCOM, RANGE, NOTADR, DFLALL), + flags=bit.bor(NEEDARG, EXTRA, NOTRLCOM, RANGE, DFLALL), addr_type='ADDR_TABS', func='ex_listdo', }, { command='tabedit', - flags=bit.bor(BANG, FILE1, RANGE, NOTADR, ZEROR, EDITCMD, ARGOPT, TRLBAR), + flags=bit.bor(BANG, FILE1, RANGE, ZEROR, EDITCMD, ARGOPT, TRLBAR), addr_type='ADDR_TABS', func='ex_splitview', }, { command='tabfind', - flags=bit.bor(BANG, FILE1, RANGE, NOTADR, ZEROR, EDITCMD, ARGOPT, NEEDARG, TRLBAR), + flags=bit.bor(BANG, FILE1, RANGE, ZEROR, EDITCMD, ARGOPT, NEEDARG, TRLBAR), addr_type='ADDR_TABS', func='ex_splitview', }, { command='tabfirst', flags=bit.bor(TRLBAR), - addr_type='ADDR_TABS', + addr_type='ADDR_NONE', func='ex_tabnext', }, { command='tabmove', - flags=bit.bor(RANGE, NOTADR, ZEROR, EXTRA, NOSPC, TRLBAR), + flags=bit.bor(RANGE, ZEROR, EXTRA, NOSPC, TRLBAR), addr_type='ADDR_TABS', func='ex_tabmove', }, { command='tablast', flags=bit.bor(TRLBAR), - addr_type='ADDR_TABS', + addr_type='ADDR_NONE', func='ex_tabnext', }, { command='tabnext', - flags=bit.bor(RANGE, NOTADR, ZEROR, EXTRA, NOSPC, TRLBAR), + flags=bit.bor(RANGE, ZEROR, EXTRA, NOSPC, TRLBAR), addr_type='ADDR_TABS', func='ex_tabnext', }, { command='tabnew', - flags=bit.bor(BANG, FILE1, RANGE, NOTADR, ZEROR, EDITCMD, ARGOPT, TRLBAR), + flags=bit.bor(BANG, FILE1, RANGE, ZEROR, EDITCMD, ARGOPT, TRLBAR), addr_type='ADDR_TABS', func='ex_splitview', }, { command='tabonly', - flags=bit.bor(BANG, RANGE, NOTADR, ZEROR, EXTRA, NOSPC, TRLBAR, CMDWIN), + flags=bit.bor(BANG, RANGE, ZEROR, EXTRA, NOSPC, TRLBAR, CMDWIN), addr_type='ADDR_TABS', func='ex_tabonly', }, { command='tabprevious', - flags=bit.bor(RANGE, NOTADR, ZEROR, EXTRA, NOSPC, TRLBAR), + flags=bit.bor(RANGE, ZEROR, EXTRA, NOSPC, TRLBAR), addr_type='ADDR_TABS_RELATIVE', func='ex_tabnext', }, { command='tabNext', - flags=bit.bor(RANGE, NOTADR, ZEROR, EXTRA, NOSPC, TRLBAR), + flags=bit.bor(RANGE, ZEROR, EXTRA, NOSPC, TRLBAR), addr_type='ADDR_TABS_RELATIVE', func='ex_tabnext', }, { command='tabrewind', flags=bit.bor(TRLBAR), - addr_type='ADDR_TABS', + addr_type='ADDR_NONE', func='ex_tabnext', }, { command='tabs', flags=bit.bor(TRLBAR, CMDWIN), - addr_type='ADDR_TABS', + addr_type='ADDR_NONE', func='ex_tabs', }, { @@ -2798,163 +2803,163 @@ return { { command='terminal', flags=bit.bor(BANG, FILES, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_terminal', }, { command='tfirst', - flags=bit.bor(RANGE, NOTADR, BANG, TRLBAR, ZEROR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, BANG, TRLBAR, ZEROR), + addr_type='ADDR_OTHER', func='ex_tag', }, { command='throw', flags=bit.bor(EXTRA, NEEDARG, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_throw', }, { command='tjump', flags=bit.bor(BANG, TRLBAR, WORD1), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_tag', }, { command='tlast', flags=bit.bor(BANG, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_tag', }, { command='tmenu', - flags=bit.bor(RANGE, NOTADR, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), + addr_type='ADDR_OTHER', func='ex_menu', }, { command='tmap', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_map', }, { command='tmapclear', flags=bit.bor(EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_mapclear', }, { command='tnext', - flags=bit.bor(RANGE, NOTADR, BANG, TRLBAR, ZEROR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, BANG, TRLBAR, ZEROR), + addr_type='ADDR_OTHER', func='ex_tag', }, { command='tnoremap', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_map', }, { command='topleft', flags=bit.bor(NEEDARG, EXTRA, NOTRLCOM), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_wrongmodifier', }, { command='tprevious', - flags=bit.bor(RANGE, NOTADR, BANG, TRLBAR, ZEROR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, BANG, TRLBAR, ZEROR), + addr_type='ADDR_OTHER', func='ex_tag', }, { command='trewind', - flags=bit.bor(RANGE, NOTADR, BANG, TRLBAR, ZEROR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, BANG, TRLBAR, ZEROR), + addr_type='ADDR_OTHER', func='ex_tag', }, { command='try', flags=bit.bor(TRLBAR, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_try', }, { command='tselect', flags=bit.bor(BANG, TRLBAR, WORD1), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_tag', }, { command='tunmenu', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_menu', }, { command='tunmap', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_unmap', }, { command='undo', - flags=bit.bor(RANGE, NOTADR, COUNT, ZEROR, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, ZEROR, TRLBAR, CMDWIN), + addr_type='ADDR_OTHER', func='ex_undo', }, { command='undojoin', flags=bit.bor(TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_undojoin', }, { command='undolist', flags=bit.bor(TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_undolist', }, { command='unabbreviate', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_abbreviate', }, { command='unhide', - flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, COUNT, TRLBAR), + addr_type='ADDR_OTHER', func='ex_buffer_all', }, { command='unlet', flags=bit.bor(BANG, EXTRA, NEEDARG, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_unlet', }, { command='unlockvar', flags=bit.bor(BANG, EXTRA, NEEDARG, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_lockvar', }, { command='unmap', flags=bit.bor(BANG, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_unmap', }, { command='unmenu', flags=bit.bor(BANG, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_menu', }, { command='unsilent', flags=bit.bor(NEEDARG, EXTRA, NOTRLCOM, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_wrongmodifier', }, { @@ -2972,103 +2977,103 @@ return { { command='version', flags=bit.bor(EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_version', }, { command='verbose', - flags=bit.bor(NEEDARG, RANGE, NOTADR, EXTRA, NOTRLCOM, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + flags=bit.bor(NEEDARG, RANGE, EXTRA, NOTRLCOM, SBOXOK, CMDWIN), + addr_type='ADDR_OTHER', func='ex_wrongmodifier', }, { command='vertical', flags=bit.bor(NEEDARG, EXTRA, NOTRLCOM), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_wrongmodifier', }, { command='visual', flags=bit.bor(BANG, FILE1, EDITCMD, ARGOPT, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_edit', }, { command='view', flags=bit.bor(BANG, FILE1, EDITCMD, ARGOPT, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_edit', }, { command='vimgrep', - flags=bit.bor(RANGE, NOTADR, BANG, NEEDARG, EXTRA, NOTRLCOM, TRLBAR, XFILE), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, BANG, NEEDARG, EXTRA, NOTRLCOM, TRLBAR, XFILE), + addr_type='ADDR_OTHER', func='ex_vimgrep', }, { command='vimgrepadd', - flags=bit.bor(RANGE, NOTADR, BANG, NEEDARG, EXTRA, NOTRLCOM, TRLBAR, XFILE), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, BANG, NEEDARG, EXTRA, NOTRLCOM, TRLBAR, XFILE), + addr_type='ADDR_OTHER', func='ex_vimgrep', }, { command='viusage', flags=bit.bor(TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_viusage', }, { command='vmap', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_map', }, { command='vmapclear', flags=bit.bor(EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_mapclear', }, { command='vmenu', - flags=bit.bor(RANGE, NOTADR, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), + addr_type='ADDR_OTHER', func='ex_menu', }, { command='vnoremap', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_map', }, { command='vnew', - flags=bit.bor(BANG, FILE1, RANGE, NOTADR, EDITCMD, ARGOPT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(BANG, FILE1, RANGE, EDITCMD, ARGOPT, TRLBAR), + addr_type='ADDR_OTHER', func='ex_splitview', }, { command='vnoremenu', - flags=bit.bor(RANGE, NOTADR, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), + addr_type='ADDR_OTHER', func='ex_menu', }, { command='vsplit', - flags=bit.bor(BANG, FILE1, RANGE, NOTADR, EDITCMD, ARGOPT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(BANG, FILE1, RANGE, EDITCMD, ARGOPT, TRLBAR), + addr_type='ADDR_OTHER', func='ex_splitview', }, { command='vunmap', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_unmap', }, { command='vunmenu', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_menu', }, { @@ -3079,56 +3084,56 @@ return { }, { command='wNext', - flags=bit.bor(RANGE, WHOLEFOLD, NOTADR, BANG, FILE1, ARGOPT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, WHOLEFOLD, BANG, FILE1, ARGOPT, TRLBAR), + addr_type='ADDR_OTHER', func='ex_wnext', }, { command='wall', flags=bit.bor(BANG, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='do_wqall', }, { command='while', flags=bit.bor(EXTRA, NOTRLCOM, SBOXOK, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_while', }, { command='winsize', flags=bit.bor(EXTRA, NEEDARG, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_winsize', }, { command='wincmd', - flags=bit.bor(NEEDARG, WORD1, RANGE, NOTADR, CMDWIN), - addr_type='ADDR_WINDOWS', + flags=bit.bor(NEEDARG, WORD1, RANGE, CMDWIN), + addr_type='ADDR_OTHER', func='ex_wincmd', }, { command='windo', - flags=bit.bor(NEEDARG, EXTRA, NOTRLCOM, RANGE, NOTADR, DFLALL), + flags=bit.bor(NEEDARG, EXTRA, NOTRLCOM, RANGE, DFLALL), addr_type='ADDR_WINDOWS', func='ex_listdo', }, { command='winpos', flags=bit.bor(EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_ni', }, { command='wnext', - flags=bit.bor(RANGE, NOTADR, BANG, FILE1, ARGOPT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, BANG, FILE1, ARGOPT, TRLBAR), + addr_type='ADDR_OTHER', func='ex_wnext', }, { command='wprevious', - flags=bit.bor(RANGE, NOTADR, BANG, FILE1, ARGOPT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, BANG, FILE1, ARGOPT, TRLBAR), + addr_type='ADDR_OTHER', func='ex_wnext', }, { @@ -3139,26 +3144,26 @@ return { }, { command='wqall', - flags=bit.bor(BANG, FILE1, ARGOPT, DFLALL, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(BANG, FILE1, ARGOPT, TRLBAR), + addr_type='ADDR_NONE', func='do_wqall', }, { command='wshada', flags=bit.bor(BANG, FILE1, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_shada', }, { command='wundo', flags=bit.bor(BANG, NEEDARG, FILE1), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_wundo', }, { command='wviminfo', flags=bit.bor(BANG, FILE1, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_shada', }, { @@ -3170,49 +3175,49 @@ return { { command='xall', flags=bit.bor(BANG, TRLBAR), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='do_wqall', }, { command='xmap', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_map', }, { command='xmapclear', flags=bit.bor(EXTRA, TRLBAR, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_mapclear', }, { command='xmenu', - flags=bit.bor(RANGE, NOTADR, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), + addr_type='ADDR_OTHER', func='ex_menu', }, { command='xnoremap', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_map', }, { command='xnoremenu', - flags=bit.bor(RANGE, NOTADR, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + flags=bit.bor(RANGE, ZEROR, EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), + addr_type='ADDR_OTHER', func='ex_menu', }, { command='xunmap', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_unmap', }, { command='xunmenu', flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, USECTRLV, CMDWIN), - addr_type='ADDR_LINES', + addr_type='ADDR_NONE', func='ex_menu', }, { @@ -3278,8 +3283,8 @@ return { }, { command='Next', - flags=bit.bor(EXTRA, RANGE, NOTADR, COUNT, BANG, EDITCMD, ARGOPT, TRLBAR), - addr_type='ADDR_LINES', + flags=bit.bor(EXTRA, RANGE, COUNT, BANG, EDITCMD, ARGOPT, TRLBAR), + addr_type='ADDR_OTHER', func='ex_previous', }, { @@ -3290,3 +3295,5 @@ return { func='ex_substitute', }, } + +return module 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 diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 003c78b241..d4764aa504 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -1086,7 +1086,10 @@ static int compute_buffer_local_count(int addr_type, int lnum, int offset) return buf->b_fnum; } -static int current_win_nr(win_T *win) +// Return the window number of "win". +// When "win" is NULL return the number of windows. +static int current_win_nr(const win_T *win) + FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT { int nr = 0; @@ -1163,7 +1166,7 @@ static void get_wincmd_addr_type(char_u *arg, exarg_T *eap) case 'd': case Ctrl_D: // window size or any count - eap->addr_type = ADDR_LINES; // -V1037 + eap->addr_type = ADDR_OTHER; // -V1037 break; case Ctrl_HAT: @@ -1199,7 +1202,7 @@ static void get_wincmd_addr_type(char_u *arg, exarg_T *eap) case '=': case CAR: // no count - eap->addr_type = 0; + eap->addr_type = ADDR_NONE; break; } } @@ -1490,9 +1493,7 @@ static char_u * do_one_cmd(char_u **cmdlinep, ea.forceit = false; } - /* - * 6. Parse arguments. - */ + // 6. Parse arguments. Then check for errors. if (!IS_USER_CMDIDX(ea.cmdidx)) { ea.argt = cmdnames[(int)ea.cmdidx].cmd_argt; } @@ -1547,12 +1548,10 @@ static char_u * do_one_cmd(char_u **cmdlinep, * Don't complain about the range if it is not used * (could happen if line_count is accidentally set to 0). */ - if (!ea.skip && !ni) { - /* - * If the range is backwards, ask for confirmation and, if given, swap - * ea.line1 & ea.line2 so it's forwards again. - * When global command is busy, don't ask, will fail below. - */ + if (!ea.skip && !ni && (ea.argt & RANGE)) { + // If the range is backwards, ask for confirmation and, if given, swap + // ea.line1 & ea.line2 so it's forwards again. + // When global command is busy, don't ask, will fail below. if (!global_busy && ea.line1 > ea.line2) { if (msg_silent == 0) { if ((flags & DOCMD_VERBOSE) || exmode_active) { @@ -1571,8 +1570,10 @@ static char_u * do_one_cmd(char_u **cmdlinep, goto doend; } - if ((ea.argt & NOTADR) && ea.addr_count == 0) /* default is 1, not cursor */ + if ((ea.addr_type == ADDR_OTHER) && ea.addr_count == 0) { + // default is 1, not cursor ea.line2 = 1; + } correct_range(&ea); @@ -1694,6 +1695,7 @@ static char_u * do_one_cmd(char_u **cmdlinep, ea.line1 = 1; switch (ea.addr_type) { case ADDR_LINES: + case ADDR_OTHER: ea.line2 = curbuf->b_ml.ml_line_count; break; case ADDR_LOADED_BUFFERS: @@ -1771,7 +1773,7 @@ static char_u * do_one_cmd(char_u **cmdlinep, errormsg = (char_u *)_(e_zerocount); goto doend; } - if (ea.argt & NOTADR) { /* e.g. :buffer 2, :sleep 3 */ + if (ea.addr_type != ADDR_LINES) { // e.g. :buffer 2, :sleep 3 ea.line2 = n; if (ea.addr_count == 0) ea.addr_count = 1; @@ -1780,8 +1782,7 @@ static char_u * do_one_cmd(char_u **cmdlinep, ea.line2 += n - 1; ++ea.addr_count; // Be vi compatible: no error message for out of range. - if (ea.addr_type == ADDR_LINES - && ea.line2 > curbuf->b_ml.ml_line_count) { + if (ea.line2 > curbuf->b_ml.ml_line_count) { ea.line2 = curbuf->b_ml.ml_line_count; } } @@ -2325,6 +2326,7 @@ int parse_cmd_address(exarg_T *eap, char_u **errormsg, bool silent) eap->line1 = eap->line2; switch (eap->addr_type) { case ADDR_LINES: + case ADDR_OTHER: // default is current line number eap->line2 = curwin->w_cursor.lnum; break; @@ -2365,6 +2367,7 @@ int parse_cmd_address(exarg_T *eap, char_u **errormsg, bool silent) eap->cmd++; switch (eap->addr_type) { case ADDR_LINES: + case ADDR_OTHER: eap->line1 = 1; eap->line2 = curbuf->b_ml.ml_line_count; break; @@ -2400,7 +2403,6 @@ int parse_cmd_address(exarg_T *eap, char_u **errormsg, bool silent) } break; case ADDR_TABS_RELATIVE: - case ADDR_OTHER: *errormsg = (char_u *)_(e_invrange); return FAIL; case ADDR_ARGUMENTS: @@ -3723,7 +3725,7 @@ static linenr_T get_address(exarg_T *eap, int address_count) // 1 for first, >1 after comma FUNC_ATTR_NONNULL_ALL { - const int addr_type = addr_type_arg; + const cmd_addr_T addr_type = addr_type_arg; int c; int i; long n; @@ -3741,6 +3743,7 @@ static linenr_T get_address(exarg_T *eap, ++cmd; switch (addr_type) { case ADDR_LINES: + case ADDR_OTHER: lnum = curwin->w_cursor.lnum; break; case ADDR_WINDOWS: @@ -3772,6 +3775,7 @@ static linenr_T get_address(exarg_T *eap, ++cmd; switch (addr_type) { case ADDR_LINES: + case ADDR_OTHER: lnum = curbuf->b_ml.ml_line_count; break; case ADDR_WINDOWS: @@ -3939,7 +3943,9 @@ static linenr_T get_address(exarg_T *eap, if (lnum == MAXLNUM) { switch (addr_type) { case ADDR_LINES: - lnum = curwin->w_cursor.lnum; /* "+1" is same as ".+1" */ + case ADDR_OTHER: + // "+1" is same as ".+1" + lnum = curwin->w_cursor.lnum; break; case ADDR_WINDOWS: lnum = CURRENT_WIN_NR; @@ -4052,11 +4058,10 @@ static char_u *invalid_range(exarg_T *eap) } if (eap->argt & RANGE) { - switch(eap->addr_type) { + switch (eap->addr_type) { case ADDR_LINES: - if (!(eap->argt & NOTADR) - && eap->line2 > curbuf->b_ml.ml_line_count - + (eap->cmdidx == CMD_diffget)) { + if (eap->line2 > (curbuf->b_ml.ml_line_count + + (eap->cmdidx == CMD_diffget))) { return (char_u *)_(e_invrange); } break; @@ -4105,7 +4110,8 @@ static char_u *invalid_range(exarg_T *eap) } break; case ADDR_TABS_RELATIVE: - // Do nothing + case ADDR_OTHER: + // Any range is OK. break; case ADDR_QUICKFIX: assert(eap->line2 >= 0); @@ -5376,7 +5382,7 @@ two_count: } *def = getdigits_long(&p, true, 0); - *argt |= (ZEROR | NOTADR); + *argt |= ZEROR; if (p != val + vallen || vallen == 0) { invalid_count: @@ -5384,8 +5390,16 @@ invalid_count: return FAIL; } } + // default for -range is using buffer lines + if (*addr_type_arg == ADDR_NONE) { + *addr_type_arg = ADDR_LINES; + } } else if (STRNICMP(attr, "count", attrlen) == 0) { - *argt |= (COUNT | ZEROR | RANGE | NOTADR); + *argt |= (COUNT | ZEROR | RANGE); + // default for -count is using any number + if (*addr_type_arg == ADDR_NONE) { + *addr_type_arg = ADDR_OTHER; + } if (val != NULL) { p = val; @@ -5416,11 +5430,11 @@ invalid_count: EMSG(_("E179: argument required for -addr")); return FAIL; } - if (parse_addr_type_arg(val, (int)vallen, argt, addr_type_arg) == FAIL) { + if (parse_addr_type_arg(val, (int)vallen, addr_type_arg) == FAIL) { return FAIL; } if (*addr_type_arg != ADDR_LINES) { - *argt |= (ZEROR | NOTADR); + *argt |= ZEROR; } } else { char_u ch = attr[len]; @@ -5447,7 +5461,7 @@ static void ex_command(exarg_T *eap) int flags = 0; int compl = EXPAND_NOTHING; char_u *compl_arg = NULL; - cmd_addr_T addr_type_arg = ADDR_LINES; + cmd_addr_T addr_type_arg = ADDR_NONE; int has_attr = (eap->arg[0] == '-'); int name_len; @@ -6105,8 +6119,7 @@ char_u *get_user_cmd_complete(expand_T *xp, int idx) /* * Parse address type argument */ -int parse_addr_type_arg(char_u *value, int vallen, uint32_t *argt, - cmd_addr_T *addr_type_arg) +int parse_addr_type_arg(char_u *value, int vallen, cmd_addr_T *addr_type_arg) FUNC_ATTR_NONNULL_ALL { int i, a, b; @@ -6129,9 +6142,6 @@ int parse_addr_type_arg(char_u *value, int vallen, uint32_t *argt, return FAIL; } - if (*addr_type_arg != ADDR_LINES) - *argt |= NOTADR; - return OK; } @@ -7423,11 +7433,12 @@ static void ex_read(exarg_T *eap) int empty = (curbuf->b_ml.ml_flags & ML_EMPTY); linenr_T lnum; - if (eap->usefilter) /* :r!cmd */ - do_bang(1, eap, FALSE, FALSE, TRUE); - else { - if (u_save(eap->line2, (linenr_T)(eap->line2 + 1)) == FAIL) + if (eap->usefilter) { // :r!cmd + do_bang(1, eap, false, false, true); + } else { + if (u_save(eap->line2, (linenr_T)(eap->line2 + 1)) == FAIL) { return; + } if (*eap->arg == NUL) { if (check_fname() == FAIL) /* check for no file name */ @@ -7897,7 +7908,7 @@ static void ex_at(exarg_T *eap) */ static void ex_bang(exarg_T *eap) { - do_bang(eap->addr_count, eap, eap->forceit, TRUE, TRUE); + do_bang(eap->addr_count, eap, eap->forceit, true, true); } /* diff --git a/src/nvim/generators/gen_ex_cmds.lua b/src/nvim/generators/gen_ex_cmds.lua index 2574af6218..844661adc3 100644 --- a/src/nvim/generators/gen_ex_cmds.lua +++ b/src/nvim/generators/gen_ex_cmds.lua @@ -22,7 +22,10 @@ local defsfname = autodir .. '/ex_cmds_defs.generated.h' local enumfile = io.open(enumfname, 'w') local defsfile = io.open(defsfname, 'w') -local defs = require('ex_cmds') +local bit = require 'bit' +local ex_cmds = require('ex_cmds') +local defs = ex_cmds.cmds +local flags = ex_cmds.flags local byte_a = string.byte('a') local byte_z = string.byte('z') @@ -51,6 +54,17 @@ static CommandDefinition cmdnames[%u] = { ]], #defs, #defs)) local cmds, cmdidxs1, cmdidxs2 = {}, {}, {} for _, cmd in ipairs(defs) do + if bit.band(cmd.flags, flags.RANGE) == flags.RANGE then + assert(cmd.addr_type ~= 'ADDR_NONE', + string.format('ex_cmds.lua:%s: Using RANGE with ADDR_NONE\n', cmd.command)) + else + assert(cmd.addr_type == 'ADDR_NONE', + string.format('ex_cmds.lua:%s: Missing ADDR_NONE\n', cmd.command)) + end + if bit.band(cmd.flags, flags.DFLALL) == flags.DFLALL then + assert(cmd.addr_type ~= 'ADDR_OTHER' and cmd.addr_type ~= 'ADDR_NONE', + string.format('ex_cmds.lua:%s: Missing misplaced DFLALL\n', cmd.command)) + end local enumname = cmd.enum or ('CMD_' .. cmd.command) local byte_cmd = cmd.command:sub(1, 1):byte() if byte_a <= byte_cmd and byte_cmd <= byte_z then diff --git a/src/nvim/testdir/test_usercommands.vim b/src/nvim/testdir/test_usercommands.vim index 0a89066a2b..4621207d19 100644 --- a/src/nvim/testdir/test_usercommands.vim +++ b/src/nvim/testdir/test_usercommands.vim @@ -393,9 +393,13 @@ func Test_addr_all() call assert_equal(len(gettabinfo()), g:a2) bwipe - command! -addr=other DoSomething echo 'nothing' + command! -addr=other DoSomething let g:a1 = | let g:a2 = DoSomething - call assert_fails('%DoSomething') + call assert_equal(line('.'), g:a1) + call assert_equal(line('.'), g:a2) + %DoSomething + call assert_equal(1, g:a1) + call assert_equal(line('$'), g:a2) delcommand DoSomething endfunc @@ -421,7 +425,7 @@ func Test_command_list() \ execute('command DoCmd')) command! -count=2 DoCmd : call assert_equal("\n Name Args Address Complete Definition" - \ .. "\n DoCmd 0 2c :", + \ .. "\n DoCmd 0 2c ? :", \ execute('command DoCmd')) " Test with various -addr= argument values.