You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Negative counts for commands get handled according to -addr, and :lnext etc also appear to use "lines" there, which results in :-1 lnext not using the number of location list entries, but the lines in the current buffer, which is rather confusing.
I think it would be good to have additional addr ranges for "items_loclist" and "items_quickfix", which would be used for related commands.
I've found in the source that there is ADDR_QUICKFIX already, but this uses is_loclist_cmd (which checks if the command starts with "l" to determine if it should use the location or quickfix list), and therefore cannot be used with user commands.
it would be good to have something like "-addr keep", which would not transform negative counts, so that :-1 Tc would echo count: -1, and not count: 41 (with 42 lines in the current buffer) (using :command! -bar -count=1 Tc echo 'count: '.<count>).
I've found ADDR_OTHER in the source, which comes close, but a) cannot be given with -addr and b) does not keep negative counts, but uses MAXLNUM - count.
Current addr ranges from the help (some are not documented there, e.g. quickfix).
Possible values are:
-addr=lines Range of lines (this is the default)
-addr=arguments Range for arguments
-addr=buffers Range for buffers (also not loaded buffers)
-addr=loaded_buffers Range for loaded buffers
-addr=windows Range for windows
-addr=tabs Range for tab pages
Negative counts for commands get handled according to
-addr
, and:lnext
etc also appear to use "lines" there, which results in:-1 lnext
not using the number of location list entries, but the lines in the current buffer, which is rather confusing.I think it would be good to have additional addr ranges for "items_loclist" and "items_quickfix", which would be used for related commands.
I've found in the source that there is
ADDR_QUICKFIX
already, but this usesis_loclist_cmd
(which checks if the command starts with "l" to determine if it should use the location or quickfix list), and therefore cannot be used with user commands.it would be good to have something like "-addr keep", which would not transform negative counts, so that
:-1 Tc
would echocount: -1
, and notcount: 41
(with 42 lines in the current buffer) (using:command! -bar -count=1 Tc echo 'count: '.<count>
).I've found
ADDR_OTHER
in the source, which comes close, but a) cannot be given with-addr
and b) does not keep negative counts, but usesMAXLNUM - count
.Current addr ranges from the help (some are not documented there, e.g. quickfix).
I've given
-addr=other
a shot in #3653.The text was updated successfully, but these errors were encountered: