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

32989Re: Bug in tag stack?

Expand Messages
  • Corinna Vinschen
    Jun 1, 2003
    • 0 Attachment
      On Sun, Jun 01, 2003 at 01:44:56PM +0200, Bram Moolenaar wrote:
      > The best method would be to do everything normally up to the point where
      > you are about to use g^] for the choice you will cancel. Then put a
      > breakpoint at do_tag() and step through that. Watch what happens with
      > tagstackidx and saved_fmark.

      I'm not entirely sure but I think I found the problem. The following
      patch seem to do the trick:

      --- tag.c.ORIG 2003-06-01 14:20:28.000000000 +0200
      +++ tag.c 2003-06-01 14:21:04.000000000 +0200
      @@ -716,10 +716,7 @@ do_tag(tag, type, count, forceit, verbos
      {
      /* no valid choice: don't change anything */
      if (use_tagstack)
      - {
      tagstack[tagstackidx].fmark = saved_fmark;
      - ++tagstackidx;
      - }
      #ifdef FEAT_CSCOPE
      cs_free_tags();
      jumped_to_tag = TRUE;


      Incrementing tagstackidx should be valid only if the choice was valid.
      Otherwise the tagstack remains unchanged, so also tagstackidx should
      remain unchanged. Adding one up if nothing happens results in wrong
      information on top of the stack.

      Is the patch ok? It helped in my case but I'm not sure if I'm missing
      something.


      Corinna

      --
      Corinna Vinschen
      Cygwin Developer
      Red Hat, Inc.
      mailto:vinschen@...
    • Show all 8 messages in this topic