zed/crates
Antonio Scandurra 711de5edcb Ensure active_item_index doesn't go off the end when closing items
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.
2022-03-05 10:52:55 +01:00
..
chat_panel Disable doctests for all libraries 2022-03-03 16:15:56 -08:00
client Render overlay after remote project becomes read-only 2022-03-04 17:28:18 +01:00
clock Disable doctests for all libraries 2022-03-03 16:15:56 -08:00
collections Disable doctests for all libraries 2022-03-03 16:15:56 -08:00
contacts_panel Disable doctests for all libraries 2022-03-03 16:15:56 -08:00
diagnostics Merge pull request #525 from zed-industries/preserve-worktrees 2022-03-04 09:48:18 +01:00
editor Open untitled buffers via the Project 2022-03-04 15:25:39 +01:00
file_finder Merge pull request #525 from zed-industries/preserve-worktrees 2022-03-04 09:48:18 +01:00
fsevent Disable doctests for all libraries 2022-03-03 16:15:56 -08:00
fuzzy Disable doctests for all libraries 2022-03-03 16:15:56 -08:00
go_to_line Disable doctests for all libraries 2022-03-03 16:15:56 -08:00
gpui 🎨 2022-03-04 17:54:48 +01:00
gpui_macros Disable doctests for all libraries 2022-03-03 16:15:56 -08:00
journal Disable doctests for all libraries 2022-03-03 16:15:56 -08:00
language Merge pull request #525 from zed-industries/preserve-worktrees 2022-03-04 09:48:18 +01:00
lsp Support formatting in fake LSP capabilities 2022-03-04 11:24:18 +01:00
outline Disable doctests for all libraries 2022-03-03 16:15:56 -08:00
project Merge branch 'main' into disconnected-status 2022-03-04 10:07:26 -07:00
project_panel Merge pull request #525 from zed-industries/preserve-worktrees 2022-03-04 09:48:18 +01:00
project_symbols Merge pull request #525 from zed-industries/preserve-worktrees 2022-03-04 09:48:18 +01:00
rpc Merge pull request #525 from zed-industries/preserve-worktrees 2022-03-04 09:48:18 +01:00
search Merge pull request #525 from zed-industries/preserve-worktrees 2022-03-04 09:48:18 +01:00
server Maintain remote worktrees correctly when building updates 2022-03-03 16:13:17 +01:00
snippet Disable doctests for all libraries 2022-03-03 16:15:56 -08:00
sum_tree Disable doctests for all libraries 2022-03-03 16:15:56 -08:00
text Use LSP range formatting when document formatting is not available 2022-03-04 10:13:17 +01:00
theme Render overlay after remote project becomes read-only 2022-03-04 17:28:18 +01:00
theme_selector Disable doctests for all libraries 2022-03-03 16:15:56 -08:00
util Merge pull request #525 from zed-industries/preserve-worktrees 2022-03-04 09:48:18 +01:00
workspace Ensure active_item_index doesn't go off the end when closing items 2022-03-05 10:52:55 +01:00
zed Merge branch 'main' into disconnected-status 2022-03-04 10:07:26 -07:00