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

Fwd: BUG? line("'A") always returns line number in all the files

Expand Messages
  • Easwy Yang
    Sorry for sending to Bram s private mail address. Here s my original mail. ... From: Easwy Yang Date: 2007-3-21 ÉÏÎç9:19
    Message 1 of 1 , Mar 20, 2007
      Sorry for sending to Bram's private mail address.
      Here's my original mail.

      ---------- Forwarded message ----------
      From: Easwy Yang <easwy.mail@...>
      Date: 2007-3-21 上午9:19
      Subject: Re: BUG? line("'A") always returns line number in all the files
      To: Bram Moolenaar <Bram@...>


      Yes, it is! Sorry for the misinformation.

      BTW, there's a mistake in the document, about col() function, the line
      "To get the line number use |col()|."
      ^^^
      should be
      "To get the line number use |line()|."


      2007/3/20, Bram Moolenaar <Bram@...>:
      >
      > Easwy Yang wrote:
      >
      > > Reproducible: Always
      > >
      > > Steps to reproduce:
      > > 1. Place an uppercase mark A in file aa.c;
      > > 2. use :echo line("'A"), it will display the correct line number;
      > > 3. change to another file, execute :echo line("'A"), it will display the line
      > > number too.
      > >
      > > Actual result:
      > > See above.
      > >
      > > Expected result:
      > > In a file other than the uppercase mark placed, line() should return 0, as
      > > vim 6.3 behaved.
      >
      > This is actually documented. The idea is that you can use line("'A") to
      > check if the mark 'A is set. To find out what buffer the mark refers to
      > use the getpos() function.
      >
      > --
      > ARTHUR: Listen, old crone! Unless you tell us where we can buy a shrubbery,
      > my friend and I will ... we will say "Ni!"
      > CRONE: Do your worst!
      > "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
      >
      > /// 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 ///
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.