Reply to message «Re: Wish: <range>», 
sent 19:09:28 13 April 2011, Wednesday
by Andy Wokula:

>      :com! -range TestZeroRange  echo <line1> <line2>
>      :0TestZeroRange
> 
>      1 1
> 
> Zero is converted to one.
> 
> Shouldn't that be regarded a bug?
1. It is not a bug because first line has number `1', not `0'.
2. `:0read!echo "abc"' and `:1read!echo "abc"' are different, so you may want 
to 
punish Bram for having yet another hack for built-in commands.

Original message:
> Am 09.04.2011 13:22, schrieb Tony Mechelynck:
> > On 09/04/11 10:57, Andy Wokula wrote:
> >> I'd appreciate a <range> argument that can be used like
> >> <line1>,<line2>
> >> but which is empty when no range was given.
> >> 
> >> I'm talking about
> >> 
> >> :h :command-range
> > 
> > Could you give a use case which would not work just as well with
> > either -range or -range=% ? You'd have to use that range somewhere.
> > 
> > Maybe you could use :0command for your special case? That range is
> > allowed, but for some commands it is not meaningful.
> > 
>      :com! -range TestZeroRange  echo <line1> <line2>
>      :0TestZeroRange
> 
>      1 1
> 
> Zero is converted to one.
> 
> Shouldn't that be regarded a bug?

Attachment: signature.asc
Description: This is a digitally signed message part.

Raspunde prin e-mail lui