Loading ...
Sorry, an error occurred while loading the content.

54932Re: Bug: 'l' breaks macro when run at the end of line

Expand Messages
  • Bram Moolenaar
    Sep 10, 2009
    • 0 Attachment
      Milan Vancura wrote:

      > while playing with macros we found this bug. Consider a two-line file:
      >
      > AA
      > 2lp
      >
      > Yank the second line, put cursor at first 'A' on the first line and do @"
      > Everything is OK: the content of second line is appended after the end of the
      > first line - as the number of 'l' (2) is more than you can do on such a short
      > line as 'AA' is.
      >
      > Then do one of the following (with the same file as we started with):
      >
      > 1. replace '2' with 'l' (same meaning: '2l' = 'll') and repeat the same
      > procedure as above
      >
      > or
      >
      > 2. put the cursor at last (second) 'A' instead of the first one in the
      > procedure above.
      >
      > The result is same in both cases: nothing is appended, the macro stopped at 'l'
      > command.
      >
      > This happens ONLY if you have a cursor on the last char of the line. Otherwise
      > everything works perfectly, even if the number before 'l' is much higher than
      > the length of the line you apply the macro.
      >
      > Tested in vim 7.1, patches 1-314 and vim 7.2 patches 1-22.
      >
      > May you look at this, please?

      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.

      --
      hundred-and-one symptoms of being an internet addict:
      214. Your MCI "Circle of Friends" are all Hayes-compatible.

      /// Bram Moolenaar -- Bram@... -- 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
      -~----------~----~----~----~------~----~------~--~---
    • Show all 13 messages in this topic