diff options
| author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-01-01 17:40:26 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-01 17:40:26 -0500 |
| commit | 5eccfd2b2e5366f2bbe6aca1471a5d52e77c9fbc (patch) | |
| tree | bee93b8000a81cc57203a8f408425a656c05e410 | |
| parent | 7718826edf0a4af175d230a691d9d9559f9d8acc (diff) | |
| parent | 52bfaea70e901f2e1db9f9db173a50ef3da898c9 (diff) | |
| download | rneovim-5eccfd2b2e5366f2bbe6aca1471a5d52e77c9fbc.tar.gz rneovim-5eccfd2b2e5366f2bbe6aca1471a5d52e77c9fbc.tar.bz2 rneovim-5eccfd2b2e5366f2bbe6aca1471a5d52e77c9fbc.zip | |
Merge pull request #13655 from janlazo/vim-8.2.2255
vim-patch:8.1.{1241,1261,1275,1281,1549,1590,1881,2079,2322,2360,2411},8.2.{113,388,934,2255,2258,2260,2269}
| -rw-r--r-- | runtime/doc/index.txt | 8 | ||||
| -rw-r--r-- | runtime/doc/quickfix.txt | 52 | ||||
| -rw-r--r-- | runtime/filetype.vim | 13 | ||||
| -rw-r--r-- | scripts/genvimvim.lua | 2 | ||||
| -rw-r--r-- | src/nvim/eval.c | 24 | ||||
| -rw-r--r-- | src/nvim/ex_cmds.c | 42 | ||||
| -rw-r--r-- | src/nvim/ex_cmds.lua | 1287 | ||||
| -rw-r--r-- | src/nvim/ex_cmds2.c | 2 | ||||
| -rw-r--r-- | src/nvim/ex_cmds_defs.h | 23 | ||||
| -rw-r--r-- | src/nvim/ex_docmd.c | 156 | ||||
| -rw-r--r-- | src/nvim/generators/gen_ex_cmds.lua | 16 | ||||
| -rw-r--r-- | src/nvim/quickfix.c | 281 | ||||
| -rw-r--r-- | src/nvim/testdir/test_filetype.vim | 5 | ||||
| -rw-r--r-- | src/nvim/testdir/test_hardcopy.vim | 80 | ||||
| -rw-r--r-- | src/nvim/testdir/test_quickfix.vim | 218 | ||||
| -rw-r--r-- | src/nvim/testdir/test_usercommands.vim | 10 | ||||
| -rw-r--r-- | src/nvim/testdir/test_window_cmd.vim | 2 | ||||
| -rw-r--r-- | test/functional/legacy/assert_spec.lua | 12 | ||||
| -rw-r--r-- | test/functional/legacy/memory_usage_spec.lua | 46 | ||||
| -rw-r--r-- | test/functional/provider/define_spec.lua | 8 |
20 files changed, 1403 insertions, 884 deletions
diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index afcacad460..17de1d8533 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -1173,9 +1173,11 @@ tag command action ~ |:caddbuffer| :cad[dbuffer] add errors from buffer |:caddexpr| :cadde[xpr] add errors from expr |:caddfile| :caddf[ile] add error message to current quickfix list +|:cafter| :caf[ter] go to error after current cursor |:call| :cal[l] call a function |:catch| :cat[ch] part of a :try command -|:cbelow| :cbe[low] go to error below current line +|:cbefore| :cbef[ore] go to error before current cursor +|:cbelow| :cbel[ow] go to error below current line |:cbottom| :cbo[ttom] scroll to the bottom of the quickfix window |:cbuffer| :cb[uffer] parse error messages and jump to first error |:cc| :cc go to specific error @@ -1336,10 +1338,12 @@ tag command action ~ |:laddexpr| :lad[dexpr] add locations from expr |:laddbuffer| :laddb[uffer] add locations from buffer |:laddfile| :laddf[ile] add locations to current location list +|:lafter| :laf[ter] go to location after current cursor |:last| :la[st] go to the last file in the argument list |:language| :lan[guage] set the language (locale) |:later| :lat[er] go to newer change, redo -|:lbelow| :lbe[low] go to location below current line +|:lbefore| :lbef[ore] go to location before current cursor +|:lbelow| :lbel[ow] go to location below current line |:lbottom| :lbo[ttom] scroll to the bottom of the location window |:lbuffer| :lb[uffer] parse locations and jump to first location |:lcd| :lc[d] change directory locally diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index d6ff3ea9ea..eb66d802ec 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -74,7 +74,7 @@ processing a quickfix or location list command, it will be aborted. *:cc* :cc[!] [nr] Display error [nr]. If [nr] is omitted, the same - error is displayed again. Without [!] this doesn't +:[nr]cc[!] error is displayed again. Without [!] this doesn't work when jumping to another buffer, the current buffer has been changed, there is the only window for the buffer and both 'hidden' and 'autowrite' are off. @@ -83,10 +83,13 @@ processing a quickfix or location list command, it will be aborted. there is another window for this buffer. The 'switchbuf' settings are respected when jumping to a buffer. + When used in the quickfix window the line number can + be used, including "." for the current line and "$" + for the last line. *:ll* :ll[!] [nr] Same as ":cc", except the location list for the - current window is used instead of the quickfix list. +:[nr]ll[!] current window is used instead of the quickfix list. *:cn* *:cne* *:cnext* *E553* :[count]cn[ext][!] Display the [count] next error in the list that @@ -125,8 +128,8 @@ processing a quickfix or location list command, it will be aborted. :[count]lab[ove] Same as ":cabove", except the location list for the current window is used instead of the quickfix list. - *:cbe* *:cbelow* -:[count]cbe[low] Go to the [count] error below the current line in the + *:cbel* *:cbelow* +:[count]cbel[ow] Go to the [count] error below the current line in the current buffer. If [count] is omitted, then 1 is used. If there are no errors, then an error message is displayed. Assumes that the entries in a quickfix @@ -136,8 +139,36 @@ processing a quickfix or location list command, it will be aborted. exceeds the number of entries below the current line, then the last error in the file is selected. - *:lbe* *:lbelow* -:[count]lbe[low] Same as ":cbelow", except the location list for the + *:lbel* *:lbelow* +:[count]lbel[ow] Same as ":cbelow", except the location list for the + current window is used instead of the quickfix list. + + *:cbe* *:cbefore* +:[count]cbe[fore] Go to the [count] error before the current cursor + position in the current buffer. If [count] is + omitted, then 1 is used. If there are no errors, then + an error message is displayed. Assumes that the + entries in a quickfix list are sorted by their buffer, + line and column numbers. If [count] exceeds the + number of entries before the current position, then + the first error in the file is selected. + + *:lbe* *:lbefore* +:[count]lbe[fore] Same as ":cbefore", except the location list for the + current window is used instead of the quickfix list. + + *:caf* *:cafter* +:[count]caf[ter] Go to the [count] error after the current cursor + position in the current buffer. If [count] is + omitted, then 1 is used. If there are no errors, then + an error message is displayed. Assumes that the + entries in a quickfix list are sorted by their buffer, + line and column numbers. If [count] exceeds the + number of entries after the current position, then + the last error in the file is selected. + + *:laf* *:lafter* +:[count]laf[ter] Same as ":cafter", except the location list for the current window is used instead of the quickfix list. *:cnf* *:cnfile* @@ -805,14 +836,19 @@ lists. They set one of the existing error lists as the current one. the current window instead of the quickfix list. *:chistory* *:chi* -:chi[story] Show the list of error lists. The current list is +:[count]chi[story] Show the list of error lists. The current list is marked with ">". The output looks like: error list 1 of 3; 43 errors ~ > error list 2 of 3; 0 errors ~ error list 3 of 3; 15 errors ~ + When [count] is given, then the count'th quickfix + list is made the current list. Example: > + " Make the 4th quickfix list current + :4chistory +< *:lhistory* *:lhi* -:lhi[story] Show the list of location lists, otherwise like +:[count]lhi[story] Show the list of location lists, otherwise like `:chistory`. When adding a new error list, it becomes the current list. diff --git a/runtime/filetype.vim b/runtime/filetype.vim index d2083b23d3..959fe35662 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -495,6 +495,9 @@ au BufNewFile,BufRead *.com call dist#ft#BindzoneCheck('dcl') " DOT au BufNewFile,BufRead *.dot,*.gv setf dot +" Dune +au BufNewFile,BufRead jbuild,dune,dune-project,dune-workspace setf dune + " Dylan - lid files au BufNewFile,BufRead *.lid setf dylanlid @@ -1121,8 +1124,8 @@ au BufNewFile,BufRead *.nse setf lua " NSIS au BufNewFile,BufRead *.nsi,*.nsh setf nsis -" OCAML -au BufNewFile,BufRead *.ml,*.mli,*.mll,*.mly,.ocamlinit setf ocaml +" OCaml +au BufNewFile,BufRead *.ml,*.mli,*.mll,*.mly,.ocamlinit,*.mlt,*.mlp,*.mlip,*.mli.cppo,*.ml.cppo setf ocaml " Occam au BufNewFile,BufRead *.occ setf occam @@ -1130,6 +1133,9 @@ au BufNewFile,BufRead *.occ setf occam " Omnimark au BufNewFile,BufRead *.xom,*.xin setf omnimark +" OPAM +au BufNewFile,BufRead opam,*.opam,*.opam.template setf opam + " OpenROAD au BufNewFile,BufRead *.or setf openroad @@ -1549,6 +1555,9 @@ au BufNewFile,BufRead *.scm,*.ss,*.rkt setf scheme " Screen RC au BufNewFile,BufRead .screenrc,screenrc setf screen +" Sexplib +au BufNewFile,BufRead *.sexp setf sexplib + " Simula au BufNewFile,BufRead *.sim setf simula 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/eval.c b/src/nvim/eval.c index f60504de5e..8a1556320c 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -5948,6 +5948,19 @@ int assert_exception(typval_T *argvars) return 0; } +static void assert_append_cmd_or_arg(garray_T *gap, typval_T *argvars, + const char *cmd) + FUNC_ATTR_NONNULL_ALL +{ + if (argvars[1].v_type != VAR_UNKNOWN && argvars[2].v_type != VAR_UNKNOWN) { + char *const tofree = encode_tv2echo(&argvars[2], NULL); + ga_concat(gap, (char_u *)tofree); + xfree(tofree); + } else { + ga_concat(gap, (char_u *)cmd); + } +} + int assert_fails(typval_T *argvars) FUNC_ATTR_NONNULL_ALL { @@ -5966,14 +5979,7 @@ int assert_fails(typval_T *argvars) if (!called_emsg) { prepare_assert_error(&ga); ga_concat(&ga, (const char_u *)"command did not fail: "); - if (argvars[1].v_type != VAR_UNKNOWN - && argvars[2].v_type != VAR_UNKNOWN) { - char *const tofree = encode_tv2echo(&argvars[2], NULL); - ga_concat(&ga, (char_u *)tofree); - xfree(tofree); - } else { - ga_concat(&ga, (const char_u *)cmd); - } + assert_append_cmd_or_arg(&ga, argvars, cmd); assert_error(&ga); ga_clear(&ga); ret = 1; @@ -5986,6 +5992,8 @@ int assert_fails(typval_T *argvars) prepare_assert_error(&ga); fill_assert_error(&ga, &argvars[2], NULL, &argvars[1], &vimvars[VV_ERRMSG].vv_tv, ASSERT_OTHER); + ga_concat(&ga, (char_u *)": "); + assert_append_cmd_or_arg(&ga, argvars, cmd); assert_error(&ga); ga_clear(&ga); ret = 1; 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 :!<cmd> ! [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..297740c752 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,53 +296,59 @@ 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_UNSIGNED', 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_UNSIGNED', 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 ', + flags=bit.bor(RANGE, COUNT, TRLBAR), + addr_type='ADDR_UNSIGNED', 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', }, { + command='cafter', + flags=bit.bor(RANGE, COUNT, TRLBAR), + addr_type='ADDR_UNSIGNED', + func='ex_cbelow', + }, + { command='call', flags=bit.bor(RANGE, NEEDARG, EXTRA, NOTRLCOM, SBOXOK, CMDWIN), addr_type='ADDR_LINES', @@ -346,49 +357,55 @@ 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='cbefore', + flags=bit.bor(RANGE, COUNT, TRLBAR), + addr_type='ADDR_UNSIGNED', + func='ex_cbelow', + }, + { command='cbelow', - flags=bit.bor(RANGE, TRLBAR), - addr_type='ADDR_OTHER ', + flags=bit.bor(RANGE, COUNT, TRLBAR), + addr_type='ADDR_UNSIGNED', 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_QUICKFIX', 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), - addr_type='ADDR_QUICKFIX', + flags=bit.bor(BANG, NEEDARG, EXTRA, NOTRLCOM, RANGE, DFLALL), + addr_type='ADDR_QUICKFIX_VALID', func='ex_listdo', }, { @@ -400,159 +417,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), - addr_type='ADDR_QUICKFIX', + flags=bit.bor(BANG, NEEDARG, EXTRA, NOTRLCOM, RANGE, DFLALL), + addr_type='ADDR_QUICKFIX_VALID', 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_UNSIGNED', 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', + flags=bit.bor(RANGE, COUNT, TRLBAR), + addr_type='ADDR_UNSIGNED', func='qf_history', |