mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-28 20:01:33 +00:00
711de5edcb
This fixes a bug introduced in #538, where closing the current tab would hide all the other tabs, if the current tab was the last one. Also, this commit manually sets the active item index instead of calling `Pane::activate_item`: even though this introduces a little bit of duplication, it prevents us from mistakenly calling `deactivate` on the wrong item. This would happen because `activate_item` looks at `self.active_item_index` to determine which item to deactivate before setting the new one. However, that index is potentially invalid because `::close_items` manipulates the `item_views` vector, so `activate_item` could end up calling `deactivate` on an item view that was not active in the first place. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |