ulyssa / modalkit

A Rust library for building modal editing applications
Apache License 2.0
57 stars 8 forks source link

Clear resize info when closing all but one window #147

Closed ulyssa closed 1 month ago

ulyssa commented 1 month ago

This fixes the issue observed in ulyssa/iamb#307 where typing <C-W>o after restoring the window layout could reproducibly crash. The problem is that when the ResizeInfo contains window lengths (which it always does on restore, since they get snapshotted), they don't get cleared when WindowLayoutState::only is called. This results in an inconsistent state that the assertion in set_area_lens runs into later on.