Milan Vancura wrote:
> > Not a bug: "2l" behaves different than "ll" when the second "l" doesn't
> > work. "2l" just stops, "ll" is an error and the operation is aborted.
> > When at the end of the line "2l" also produces an error, since it can't
> > move at all.
>
> Hello Bram.
>
> I'm sorry to seem nit-picking but what you did is you perfectly
> described what happens (in better words than I did, or at least
> shorter) but you did not write any single word about why such
> behaviour is not a bug. Neither 99l on previous-to-last char nor '99l'
> on the last char can't be done (completely). I really don't see the
> logic in background of this.
>
> Yes, I found one point myself: I see the same behaviour in linewise
> mode: d99j works on any other line than the last one. But why such
> non-intuitive behaviour is there? Other then bug-to-bug compatibility
> with vi? (if that is the only reason we may think about an option and
> about including that option setting as a part of 'compatible' option).
> I tried to think about reasons (for macro programming or general
> usage) but found really nothing.
>
> Thank you for the explanation,
The main reason is Vi compatibility.
The reasoning is that if the cursor doesn't move at all for a movement
command then it's an error. If it can move less than intended then this
is not handled like an error. It's common to do 999l to go as far right
as possible.
Note that there are a few exceptions, again for Vi compatibility.
--
hundred-and-one symptoms of being an internet addict:
219. Your spouse has his or her lawyer deliver the divorce papers...
via e-mail.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---