           # Allow the already-set @frame a chance to see if it still applies.
           # This lets the caller and called navigation work properly, even if multiple frames are
           # on the same line.
-          unless @frame? and @frame.isOn(pos)
-
+          if @frame? and @frame.isOn(pos)
+            @useFrame(@frame)
+          else
             # Otherwise, scan the trace for a matching frame.
             frame = @trace.atEditorPosition(pos)
             if frame? then @useFrame(frame) else @unfocusFrame()

        @span class: 'inline-block index', outlet: 'frameIndex'
        @span class: 'inline-block divider', '/'
        @span class: 'inline-block total', outlet: 'frameTotal'

  initialize: ->
    @subscribe Stacktrace, 'active-changed', (e) =>

  navigateToCaller: ->
    return unless @trace? and @frame?

    f = @trace.callerOf(@frame)
    if f?
      @frame = f
      @frame.navigateTo()

  navigateToCalled: ->
    return unless @trace? and @frame?

    f = @trace.calledFrom(@frame)
    if f?
      @frame = f
      @frame.navigateTo()

module.exports = NavigationView: NavigationView
