Mikayla Maki and antonio
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
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
0964a3d49f
Move postage crate version specification to workspace Cargo.toml
2023-03-21 11:26:13 -07:00
Mikayla Maki
fc7532d74d
Added complete scripts for generating third party license files
2023-01-23 12:47:12 -08:00
Max Brunsfeld
71b684108d
Add test for avoiding indent adjustment inside newly-created errors
2023-01-20 17:02:38 -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
Julia and Max Brunsfeld
9206dd5461
Remove spurious lifetimes
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2022-11-23 13:52:39 -05:00
Julia and Max 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
Julia and Max 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
Julia and Max 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
ForLoveOfCats and Mikayla
fbea44bc5c
One big cleanup pass of clippy lints
...
Co-authored-by: Mikayla <mikayla@zed.dev >
2022-08-10 16:51:01 -07:00
Max Brunsfeld
88efb420e4
Replaces lines_utf16 with a single u32 - last_line_len_utf16
2022-07-25 11:35:42 -07:00
Antonio Scandurra
cb2dfa883e
Introduce MultiBuffer::clip_offset_utf16
2022-07-25 15:06:04 +02:00
Antonio Scandurra
37c4f2bbf3
Introduce Rope::clip_offset_utf16
2022-07-25 15:02:45 +02:00
Antonio Scandurra
47fce17ff8
Merge branch 'main' into ime-support-2
2022-07-25 10:47:49 +02:00
Antonio Scandurra
daff3fc7f6
Coalesce IME compositions into a single edit
2022-07-25 09:53:51 +02:00
Antonio Scandurra
ffdedfe04d
🎨
2022-07-23 09:31:41 +02:00
Antonio Scandurra
db5f26474b
Allow grouping local transactions even if remote peer edits in between
2022-07-23 09:27:21 +02:00
Max Brunsfeld
9e716749e6
Combine adjacent ranges in 'edited_ranges_for_transaction'
2022-07-22 17:41:31 -07:00
Max Brunsfeld and Antonio Scandurra
51868f445b
Remove versioned offset ranges from transactions and undo operations
...
Now, instead of using these versioned offset ranges, we locate the
fragments associated with a transaction using the transaction's
edit ids. To make this possible, buffers now store a new map called
`insertion_slices`, which lets you look up the ranges of insertions
that were affected by a given edit.
Co-authored-by: Antonio Scandurra <antonio@zed.dev >
2022-07-22 17:28:55 -07:00
Max Brunsfeld and Antonio Scandurra
48aff8d05d
Move edited_ranges_for_transaction from BufferSnapshot to Buffer
...
Co-authored-by: Antonio Scandurra <antonio@zed.dev >
2022-07-22 11:24:14 -07:00
Antonio Scandurra
dbe8a85af5
Treat NSTextInputClient ranges as UTF-16
2022-07-21 13:41:35 +02:00
Antonio Scandurra
d103825bc6
Start indexing UTF-16 offsets
...
This is needed because cocoa will report ranges as UTF-16 indices.
2022-07-21 09:40:48 +02:00
K Simmons
ed91cee43d
working diagnostic popover. Also renamed GoToNextDiagnostic to GoToDiagnostic and adjusted it's action to jump to the popover's diagnostic if it is visible
2022-07-20 19:02:33 -07:00
Antonio Scandurra and Max Brunsfeld
6d573a2822
Normalize line endings when parsing completions
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2022-07-06 19:32:45 +02:00
Antonio Scandurra
0f77fd8b2d
Replace lone carriage returns with newlines
2022-07-06 11:00:56 +02:00
Antonio Scandurra
862e11cc09
Don't slice midway through multi-byte char when detecting line ending
2022-07-06 10:21:30 +02:00
Max Brunsfeld and Keith Simmons
e6c9549bbd
Strip carriage returns from all text in text::Buffer
...
* Moving the logic from Rope to text::Buffer makes it easier
to keep the Rope in sync with the fragment tree.
* Removing carriage return characters is lossier, but is much
simpler than incrementally maintaining the invariant that
there are no carriage returns followed by newlines. We may
want to do something smarter in the future.
Co-authored-by: Keith Simmons <keith@zed.dev >
2022-07-05 17:25:09 -07:00
Max Brunsfeld
69ed736484
Change Buffer constructors to construct the History internally
2022-07-05 14:51:52 -07:00
Antonio Scandurra
c24e1a36ca
Replace \r and \r\n with \n when indexing text into the rope
2022-07-04 15:37:40 +02:00