Wrong pane activates on close of active pane (bug in getMostRecentLeaf())

Steps to reproduce

  1. Open multiple panes, activating them in turn before opening another
  2. Close the currently active pane

Expected result

The most-recently active pane should activate

Actual result

The first pane always activates


  • Operating system: Windows
  • Obsidian version: 0.10.1

Additional information

The problem is due to a bug in the workspace.getMostRecentLeaf() method: it always returns the first/leftmost pane, because its iterator function returns true instead of false. This prematurely terminates iteration instead of actually searching through the panes to find the most recent one.


Good catch and nice debugging. Exactly what I needed to fix!

will be fixed 0.10.3