2a6f06f
Merge pull request #359 from zed-industries/defer
Click to expand commit body
Fix panic in ProjectDiagnosticsEditor::open_excerpts by introducing new defer feature to GPUI
Nathan Sobo
created
e61a5b1
Defer pane interaction when opening excerpts in diagnostics view
Click to expand commit body
Activating a new item causes the current item to be deactivated. We're the current item, but we're on the stack, so we panic if we try to do this synchronously. If we use defer to wait until we're off the stack it works.
It's like update, but happens after the current effect instead of synchronously. Also, it doesn't allow the callback to return a value because there would be nothing to do with it.
This takes a closure that will be enqueued as an effect to ensure there are no entities on the stack.
Nathan Sobo
created
b1931fb
Merge pull request #358 from zed-industries/move-buffers-to-project
Click to expand commit body
Move buffers to project
Nathan Sobo
created
8341820
Assign diagnostics on buffer even if it doesn't have a language
Click to expand commit body
This shouldn't be necessary in practice but makes testing easier.
Nathan Sobo
created
8bf628c
Update new buffers with existing diagnostics in Project – after assigning language
Nathan Sobo
created
2773cab
Simplify opening buffers in the Project and assign language synchronously
Antonio Scandurra
created
31dfd01
Make `add_local_worktree` private and use `find_or_create_local_worktree`
Click to expand commit body
The former always adds a worktree, even if we have one already in the
project and that could be misused. The public API should always search
for a local worktree containing the requested path first so that the
project can uphold invariants about which worktrees it has.
We don't use it now, and plan on dealing with it in a dedicated way when we need mouse hover interactions.
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
6e7e86e
Remove weak worktrees from project when nobody references them
Click to expand commit body
Also, avoid showing them in the project panel as well as in the
contacts panel.
Antonio Scandurra
created
ee95775
Unregister worktree when its last handle to it gets released
Antonio Scandurra
created
9505d6c
Disable the nav history when selecting a definition in a different buffer
Click to expand commit body
When jumping between different buffers, we don't care about the cursor's previous location. When navigating backward, we want to jump directly to the site of the jump.
Nathan Sobo
created
1c21b51
Merge pull request #355 from zed-industries/activate-existing-windows
Click to expand commit body
Move window to the foreground when opening a path in an existing workspace
Nathan Sobo
created
fbca283
When opening a path in an existing window, move it to the foreground
Nathan Sobo
created
377e41a
Make navigation history work with project diagnostics
Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
Antonio Scandurra
,
Nathan Sobo
, and
Max Brunsfeld
created
6b1f989
Omit worktree id when emitting `Event::DiskBasedDiagnosticsUpdated`
Click to expand commit body
Sometimes we will have more than one worktree associated with the same
language server and in that case it's unclear which worktree id we should
report an event for.
Antonio Scandurra
created
71082d4
Return a `Task<Result<()>>` in `{ItemView,Buffer,MultiBuffer}::save`
Antonio Scandurra
created
634340d
Return a task from `Workspace::save_active_item`
Click to expand commit body
This required changing our approach to OS prompts and this commit greatly
simplifies that. We now avoid passing a callback and return a simple future
instead. This lets callers spawn tasks to handle those futures.
Antonio Scandurra
created
e56c043
Get tests passing, centralize more diagnostic logic in Project