Steps to reproduce
- Open multiple panes, activating them in turn before opening another
- Close the currently active pane
Expected result
The most-recently active pane should activate
Actual result
The first pane always activates
Environment
- 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.