32989Re: Bug in tag stack?
- Jun 1, 2003On 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 whereI'm not entirely sure but I think I found the problem. The following
> 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.
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 */
tagstack[tagstackidx].fmark = saved_fmark;
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
Red Hat, Inc.
- << Previous post in topic Next post in topic >>