Commit Graph
189 Commits
Author SHA1 Message Date
Mikayla 1d665148b3 Fix infinite loop in select all matches 2023-09-20 08:25:21 -07:00
Max Brunsfeld fe943bc46b Remove local timestamps from CRDT operations
Use lamport timestamps for everything.
2023-08-31 16:23:06 -07:00
da054bfbb5 Avoid accidental gpui transitive dependency in collab
* Make Fs depend on Text, not vise versa

Co-authored-by: Joseph <joseph@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-30 13:16:01 -07:00
Antonio Scandurra 40c8e5b9ef Allow redoing edits performed by inline assistant after cancelling it 2023-08-28 14:42:52 +02:00
Antonio Scandurra 6eb450178e Merge remote-tracking branch 'origin/main' into ai-refactoring 2023-08-25 13:37:32 +02:00
Antonio Scandurra c549cdb9b2 Rework inline assistant 2023-08-25 11:39:27 +02:00
Antonio Scandurra 07fac03f4f Rename merge_transaction_into to merge_transactions 2023-08-24 14:26:42 +02:00
Max BrunsfeldandMikayla 992eddbff0 Snapshot channel notes buffers when everyone leaves
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-23 18:37:01 -07:00
Antonio ScandurraandKyle Caverly 50df6db592 Group modal assistant edits into the same transaction
Co-Authored-By: Kyle Caverly <kyle@zed.dev>
2023-08-23 17:09:15 +02:00
Kirill Bulatov 1a5f3c1991 Remove excessive hint update queries
* Filter out queries for outdated buffers just before hint tasks spawn:
  multicared edits might empit standalone events simultaneously
* Only spawn inlay update tasks for visible buffers with corresponding
  language
* Do not spawn tasks for local projects' buffers without LSP servers
2023-06-30 22:03:21 +03:00
Nathan Sobo e526fd506e Rename SumTree::push_tree to ::append 2023-06-19 19:49:33 -06:00
Joseph Lyons 4b5a7ec94a Fix typos 2023-06-02 22:02:19 -04:00
Piotr Osiewicz 2ff93b2bc5 editor: add select previous command (#2556)
Added a `select previous` command to complement `select next`.
Release Notes:

- Added "Select previous" editor command, mirroring `Select next`.
Ticket number: Z-366
2023-06-02 17:32:34 +02:00
Mikayla Maki b72cdb7362 Refactored apart the forward and the backwards iterator for diff hunks 2023-05-19 18:09:47 -07:00
Mikayla Makiandmax c9a3283048 refine batched anchor conversions
co-authored-by: max <max@zed.dev>
2023-05-19 16:52:57 -07:00
JuliaandAntonio Scandurra 03e9b764b1 Store history base text as rope
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2023-05-04 12:32:31 -04:00
Max Brunsfeld 5bcf6da6ea Fix 'invalid insertion' panic when following
Wait for the necessary buffer operations to arrive before attempting to
set selections and scroll top.
2023-04-18 16:13:18 -07:00
Max Brunsfeld 0098706f6e Fix leak when project is unshared while LSP handler waits for edits 2023-04-10 17:03:58 -07:00
Max Brunsfeld 3a2d13541f Merge branch 'main' into randomized-tests-operation-script 2023-04-05 17:10:20 -07:00
Mikayla Makiandantonio 00d2f4f732 Invalidate copilot suggestion on backspaces
Restore an observation on initialization

co-authored-by: antonio <antonio@zed.dev>
2023-04-05 08:48:39 -07:00
Max Brunsfeld 2f192aedcb Merge branch 'main' into randomized-tests-operation-script 2023-04-03 13:09:25 -07:00
93db8b20e2 Fix prefix/suffix calculation when determining copilot suggestion
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2023-03-31 18:05:07 +02:00
Max Brunsfeld 8686764ebb Merge branch 'main' into randomized-tests-operation-script
In randomized integration test, incorporate random updates of existing
files into the test's new structure.
2023-01-24 12:39:24 -08:00
Max Brunsfeld 71b684108d Add test for avoiding indent adjustment inside newly-created errors 2023-01-20 17:02:38 -08:00
Max Brunsfeld 0eb04df1b0 Set up flow for mutating clients via explicit operation values 2023-01-06 15:32:11 -08:00
Nathan Sobo b3387b31ac Set transaction group interval to ZERO by default in tests
We were seeing non-deterministic behavior in randomized tests when
generating backtraces took enough time to cause transactions to group
in some cases, but not group in others.

Tests will need to explicitly opt into grouping if they want it by
setting the interval explicitly. We have tests in the text module that
currently test the history grouping explicitly, but I'm not sure
it's needed elsewhere.
2022-12-27 16:47:28 -07:00
Max Brunsfeld ce0c9a8dd4 Start work on following in multi-buffers 2022-11-29 14:50:43 -08:00
Max Brunsfeld 883d683ee8 Add a layer of indirection between excerpt ids and locators 2022-11-28 14:18:49 -08:00
JuliaandMax Brunsfeld 9206dd5461 Remove spurious lifetimes
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-11-23 13:52:39 -05:00
JuliaandMax Brunsfeld 399af478fc Consistency in prefix/suffix/signature of UTF16 point to point conversion
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-11-23 13:52:18 -05:00
Julia 06895033f3 Fixup compile errors 2022-11-22 02:49:47 -05:00
JuliaandMax Brunsfeld 0b63261fb8 Start adding concept of Unclipped text coordinates
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-11-21 15:48:25 -05:00
Julia c4eca8274a Rename clamped -> clipped 2022-11-21 15:23:00 -05:00
Julia 1ca040ee67 Clamp UTF-16 to point conversions 2022-11-21 14:25:01 -05:00
Julia 1837b188d2 Clamp for all UTF-16 to offset conversions which used to use ToOffset 2022-11-21 14:25:01 -05:00
Julia 1707d76fbb Clamp UTF-16 coordinate while performing LSP edits rather than panicing 2022-11-21 11:48:13 -05:00
Max Brunsfeld a2c9a67558 Re-export basic text types from text and language crates
Also avoid production dependencies on fs and rope in collab
2022-10-12 15:48:19 -07:00
Mikayla Maki a9ce687031 Finished refactoring out fs and rope 2022-10-11 15:25:54 -07:00
Mikayla Maki 9bdb8d31c0 Moved fs to it's own crate, build failing due to cyclic dependency on rope 2022-10-11 13:03:36 -07:00
484bdb0fc0 Start a test for remote git data updating
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-09-30 15:51:32 -04:00
19cd0dedb9 Use sumtree instead of iterator linear search for diff hunks in range
Co-Authored-By: Max Brunsfeld <max@zed.dev>
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-30 13:32:54 -04:00
JuliaandMax Brunsfeld 60bff07555 Move cloneable diff state into new snapshot type
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-09-29 13:16:02 -04:00
Julia 1853e15a73 Checkpoint on incremental diff sumtree shenanigans 2022-09-29 13:16:02 -04:00
Antonio Scandurra 1374596dd8 💄 2022-09-28 11:27:07 +02:00
Antonio Scandurra 113591bee9 Use a SumTree as the backing storage of UndoMap
This makes it cheap to clone and avoids slowdowns when there the undo
history is long.
2022-09-28 11:24:45 +02:00
Max Brunsfeld 13cf937778 Merge pull request #1559 from zed-industries/language-injection
Add language injection support
2022-08-30 11:54:00 -07:00
Max Brunsfeld 509bc3db97 Add Buffer::anchored_edits_since method
This method returns the anchor range associated with each edit. The
anchor ranges allow you to determine how each edit interacts with
an existing anchor range that the edit has touched.
2022-08-29 16:51:31 -07:00
Max Brunsfeld 7f9477bf28 Update to latest tree-sitter commit
This is needed for https://github.com/tree-sitter/tree-sitter/pull/1845
2022-08-25 10:58:46 -07:00
Antonio Scandurra 89b54e5272 Move operation serialization off the main thread 2022-08-23 16:34:25 +02:00
Antonio Scandurra d5a38f0bb1 Fix divergence bug in undo/redo
As part of #1405, we changed the way we performed undo and redo to
support combining transactions that were not temporally adjacent for
IME purposes.

We introduced a bug with that release that caused divergence
when performing undo: the bug was caused by only changing the visibility
of fragments whose insertion id was contained in the undo operation. However,
an undo operation also affects deletions which we were mistakenly not
considering. Randomized tests caught this but I guess we didn't run enough
of them.
2022-08-17 11:30:04 +02:00