Reviewed and tested again. It looks correct and fixes the bug.
Although the relevant logic is a prime candidate for automated testing, the relevant classes are not yet isolated enough to be unit-testable. And doing so in src/window.cpp is a risky proposition.
Reviewed and tested again. It looks correct and fixes the bug.
Although the relevant logic is a prime candidate for automated testing, the relevant classes are not yet isolated enough to be unit-testable. And doing so in src/window.cpp is a risky proposition.