Skip to content
  • Kai Willadsen's avatar
    filediff: Reestablish focus on comparison refresh (bgo#784436) · 5640a5b3
    Kai Willadsen authored
    The way that comparison refresh disables and reenables textview
    sensitivity and handlers, it destroys pane focus and stops us from
    updating our cursor data (e.g., what are the next and previous chunks).
    
    This can lead to a situation where our comparison results have changed,
    but we haven't updated our cursor details. Because next/previous actions
    (among others) don't need a currently focused pane, these will try to
    run with stale data and break.
    
    The fix here, while it seems odd, is to refocus the last focused pane
    (if there is one) on comparison refresh. The focus change causes the
    cursor structure to re-update, and the cursor data used by actions is no
    longer stale.
    5640a5b3