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

Re: :help !! jumps to :!! topic instead

Expand Messages
  • John Little
    ... Indeed Tony, looking in tag.c line 1084: if (STRNCMP(lbuf, !_TAG_ , 6)
    Message 1 of 6 , Sep 5, 2013
    • 0 Attachment
      On Thursday, September 5, 2013 11:22:23 AM UTC+12, Tony Mechelynck wrote:
      > ... maybe an initial exclamation mark in the
      > tags file, as in
      > (which can be generated by ctags but, it seems, not by :helptags) means
      > a preprocessor line, not a tag definition line? Maybe Vim ought to use
      > !_ (bang-underscore), or even !_TAG_FILE_, but in any case not just !
      > (bang) in column 1 as the preprocessor line leader then. It could then
      > recognise ! and !! as tags.

      Indeed Tony, looking in tag.c line 1084:

      if (STRNCMP(lbuf, "!_TAG_", 6) <= 0

      If a tag line at the beginning of the file (as the ! and !! entries are) sorts before "!_TAG_", it is treated as a header line, and if it's not recognized it's ignored. If I change the condition to == 0, as seems to be the intent of the code, and :help ! and :help !! work.

      Tests 25, 32 and 83, the only ones to mention tags, pass with that change. It really needs to be checked with a large tags file so that the binary search stuff is tested.

      Regards, John Little

      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    Your message has been successfully submitted and would be delivered to recipients shortly.