@@ -95,9 +95,7 @@ func (t *thread) Evaluate(ctx Context, c gateway.Client, headRef gateway.Referen
9595 return err
9696 }
9797
98- if action == stepContinue {
99- t .setBreakpoints (ctx )
100- }
98+ t .setBreakpoints (ctx )
10199 k , next , refs , err = t .seekNext (ctx , next , action )
102100 }
103101 return nil
@@ -465,13 +463,13 @@ func (t *thread) seekNext(ctx Context, from *step, action stepType) (string, *st
465463 var target * step
466464 switch action {
467465 case stepNext :
468- target = from .next
466+ target = t . continueDigest ( from , from .next )
469467 case stepIn :
470468 target = from .in
471469 case stepOut :
472- target = from .out
470+ target = t . continueDigest ( from , from .out )
473471 case stepContinue :
474- target = t .continueDigest (from )
472+ target = t .continueDigest (from , nil )
475473 }
476474 return t .seek (ctx , target )
477475}
@@ -498,8 +496,8 @@ func (t *thread) seek(ctx Context, target *step) (k string, result *step, mounts
498496 return k , result , refs , nil
499497}
500498
501- func (t * thread ) continueDigest (from * step ) * step {
502- if len (t .bps ) == 0 {
499+ func (t * thread ) continueDigest (from , until * step ) * step {
500+ if len (t .bps ) == 0 && until == nil {
503501 return nil
504502 }
505503
@@ -514,13 +512,13 @@ func (t *thread) continueDigest(from *step) *step {
514512
515513 next := func (s * step ) * step {
516514 cur := s .in
517- for cur != nil {
515+ for cur != nil && cur != until {
518516 if isBreakpoint (cur .dgst ) {
519517 return cur
520518 }
521519 cur = cur .in
522520 }
523- return nil
521+ return until
524522 }
525523 return next (from )
526524}
0 commit comments