Previously, we tracked the worktree_id and entry_id separately, but now that entry ids are unique across all worktrees this is unnecessary.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-Authored-By: Keith Simmons <keith@the-simmons.net>
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.
This commits adds the beginnings of an application state facility as a non-static place to store the most recently-activated search for each project.
I also store workspace items by descending order of their entity id so that we always fetch the newest item of a given type when calling `Workspace::item_of_type`.
Also: Introduce the ability to disable and enable the nav history directly. This allows us to explicitly push an entry when opening excerpts and then disable all pushes as we open individual buffers.
Also: Remove special handling for alt-shift-D binding in diagnostics view that opens excerpts. Rely on alt-enter in all multi-buffers instead.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
* Since regular editors' font sizes and families are controlled by
the settings and not the theme, don't store a dummy text style in
the theme. Instead, only store a font color, and synthesize
the text style for regular editors using both the theme and the
settings.
* Style single-line and auto-height editors (now called "field
editors") using a single function that takes the entire theme and
selects a relevant sub-object.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
* Distinguish between checking for updates and downloading
* Show dismissable error message when downloading failed and there
is no cached server.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>