947fe84
Make multibuffer anchor's buffer_id optional
Click to expand commit body
Avoid using 0 for a buffer id on Anchor::min and max
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Max Brunsfeld
,
Antonio Scandurra
, and
Nathan Sobo
created
fa194c8
Pass the pending selection to update_selections and set_selections
Click to expand commit body
This helps us preserve our invariant of always having at least a pending selection in set_selections when comparing old and new cursor positions.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Nathan Sobo
and
Max Brunsfeld
created
ad9a0e2
Revert "Ensure there's always at least one selection in the editor"
Click to expand commit body
This reverts commit b1a44b5816eeb021efbd5bb49cd5a60573cf508a.
3a1f9bb
Start work on applying LSP edits via a diff
Click to expand commit body
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Max Brunsfeld
and
Antonio Scandurra
created
424b352
Don't open a multibuffer when code actions's edits are contained in the current editor
Click to expand commit body
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Max Brunsfeld
,
Antonio Scandurra
, and
Nathan Sobo
created
5049c1b
Make Editor::newest_anchor_selection return a non-optional value
Click to expand commit body
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Nathan Sobo
,
Antonio Scandurra
, and
Max Brunsfeld
created
93eb005
Correctly redo all undone edits after undoing in multi-buffer
Click to expand commit body
When undoing edits performed in the multi-buffer, we also undo subsequent edits that may have occurred outside of the multi-buffer. This commit makes us redo those edits as well.
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Nathan Sobo
and
Antonio Scandurra
created
c5b0b5f
Store the oldest transaction id for each excerpted buffer in multi-buffer transactions
Click to expand commit body
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Nathan Sobo
and
Antonio Scandurra
created
9936bb2
Undo subsequent edits when undoing in multi-buffer
Click to expand commit body
When undoing in the multi-buffer, don't preserve edits that occurred outside the multi-buffer after the edit being undone.
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Nathan Sobo
and
Antonio Scandurra
created
d1f1563
Push transaction into multi-buffer to allow undoing of a code action
Antonio Scandurra
created
dd223f9
Allow editor to be saved when in multi-buffer mode
Click to expand commit body
Also, this commit enables the customization of the title in a multi-buffer.
When specified, it will take precedence over a filename (or "untitled").
Antonio Scandurra
created
9ea5359
Fix `push_excerpts_with_context_lines` when ranges overlap
Antonio Scandurra
created
9749fea
Start work on MultiBuffer::push_excerpts_with_context_lines
Click to expand commit body
Use it in Editor::confirm_code_action
Max Brunsfeld
created
471c23e
Allow inserting multiple excerpts in a batch
6731d92
Give the editor a handle to the project, not a weak handle to the workspace
Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Max Brunsfeld
and
Nathan Sobo
created
624dbc1
Fix confirming completions in a multibuffer
Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Max Brunsfeld
and
Nathan Sobo
created
93bcde9
Consolidate logic for completion alongside code actions in Project
Click to expand commit body
This way, completions are dealt with more consistently with code actions,
and the logic is not spread across so many places. The `language::File`
trait and the multibuffer no longer need to deal with completions. Completions
are no longer generic over an anchor type.
Max Brunsfeld
created
722c84c
Consolidate all code actions logic into Project
624eb59
Serialize buffer in terms of operations rather than state
Click to expand commit body
This is required because, after joining, we want to be able to refer
to operations that have happened prior to joining, which are not
captured by the state. There is probably a way of reconstructing operations
from the state, but that seems unnecessary and we've already talked about
wanting to have the server store operations rather than state once we start
persisting worktrees.