2009/9/10 John Beckett <[email protected]>:
>
> Milan Vancura wrote:
>> Consider a two-line file:
>>
>> AA
>> 2lp
>
> I am going to take a wild guess and hope that someone will find
> support in the documentation.
>
> A command like 99l may be interpreted to mean "move right N
> times, where N is the smaller of 99 and the maximum possible".
>
> However, a command like ll might mean "move right, then move
> right again; if either of these cannot move, that is an error".
>
> Conclusion: Your 2l command did not abort the macro because not
> moving was not considered an error, but the ll command did
> generate an error. I suppose one could try a test with try/catch
> for a further experiment.
>
> John

I agree with you (and I hope it is not a misinterpretation of your
email) that this behaviour might be intended. However, if your
explanation of the difference between 2l and ll is correct, I would
expect the macro not to fail even if the cursor is placed on the
second A.
BTW unlike documentation e.g. for :global or :tabdo, documentation for
@ does not mention the expected behaviour if an error is encountered.
IMHO this means that errors should be ignored.

-- 
Lech

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui