Antonio Scandurra
de3a7f8a48
Remove duplication when assigning diagnostics and hardcode provider names
2021-12-24 12:07:26 +01:00
Max Brunsfeld
1485a4f47b
Add a unit test for preserving disk-based diagnostics
2021-12-22 13:27:43 -08:00
Max Brunsfeld
3c1b8a106b
Fix context line handline in project diagnostic view
2021-12-21 11:46:47 -08:00
Antonio Scandurra
4521b576c8
Don't insert headers in MultiBuffer
...
This lays the groundwork to insert headers in the block map instead.
2021-12-21 16:38:18 +01:00
Antonio Scandurra
116d076398
Ensure BlockMap::clip_point always yield a valid buffer location
2021-12-16 12:29:37 +01:00
4fa620e9db
Remove disk diagnostics that were invalidated by a buffer edit
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2021-12-15 18:29:01 +01:00
Antonio Scandurra and Nathan Sobo
bf0166bc90
Re-enable multi-byte random character generation
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-15 17:51:11 +01:00
Antonio Scandurra
5b3482b177
Implement MultiBuffer::reversed_chars_at
2021-12-15 10:06:45 +01:00
Antonio Scandurra
04eade7d19
Maintain a different undo/redo stack in MultiBuffer
...
This only applies to singleton mode.
2021-12-14 17:43:41 +01:00
Antonio Scandurra and Nathan Sobo
defb1ecf0f
Return the transaction id after grouping in end_transaction_at
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-14 17:41:42 +01:00
Antonio Scandurra
52a5bfa4c8
Show remote collaborators' active selections
2021-12-13 11:38:38 +01:00
Nathan Sobo
b00acf619a
Test undo/redo at editor layer, including selection restoration
2021-12-12 15:04:19 -07:00
Nathan Sobo
9836638fb5
More messy progress towards selections in editors
2021-12-11 00:29:34 -07:00
Nathan Sobo
5fc5ed5754
WIP: Start on removing selections from buffer in favor of editor
2021-12-10 19:23:34 -07:00
Nathan Sobo
8b62df74fd
Return optional transaction ids from undo/redo
...
This will allow the editor to restore selections that it associated with the start or end of a transaction.
2021-12-10 18:08:26 -07:00
Nathan Sobo
55bcc9fa9e
Return optional transaction ids when starting/ending a transaction
...
If the transaction was nested, we return None. Otherwise we return the transaction id in preparation for editors to maintain their own selection state.
2021-12-10 18:00:09 -07:00
Antonio Scandurra and Nathan Sobo
0f09c69ac6
Finish removing anchor collections from MultiBuffer
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-10 15:58:37 +01:00
Antonio Scandurra and Nathan Sobo
31a4a6deff
Re-implement edits_since_in_range in terms of Locator
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-10 14:22:43 +01:00
Antonio Scandurra
fdb34185e8
Merge branch 'fragment-locators' into project-diagnostics
2021-12-10 14:01:17 +01:00
Antonio Scandurra
e6277205e3
Optimize anchor comparison and take full advantage of fragment IDs
2021-12-10 09:16:58 +01:00
Max Brunsfeld
ca04b13788
Merge branch 'fragment-locators' into HEAD
2021-12-09 14:49:04 -08:00
Max Brunsfeld
99ce013a1e
Batch anchor resolution, avoid cloning fragment ids when seeking
2021-12-09 11:00:40 -08:00
Antonio Scandurra
bb50f18dd2
WIP
2021-12-09 18:27:54 +01:00
Antonio Scandurra and Nathan Sobo
a29758b389
Remove anchor collections
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-09 17:28:27 +01:00
Antonio Scandurra
6aa620475d
Don't use an enum for anchors and model min/max more implicitly
...
This will make it easier to serialize an anchor.
2021-12-09 12:01:17 +01:00
Antonio Scandurra
748f8e02e4
Implement anchor resolution using locators
2021-12-09 11:18:01 +01:00
Antonio Scandurra
90eb03186d
Store only clock::Local in InsertionFragment
2021-12-09 09:21:52 +01:00
Antonio Scandurra
2c4f4fa872
Make remote edit randomized tests pass with locators
2021-12-09 09:15:19 +01:00
Antonio Scandurra
4a5281f234
Make local edit randomized tests pass with locators
2021-12-09 09:11:16 +01:00
Nathan Sobo
ef98b86858
Start on maintaining an insertions tree
...
I'm correctly assigning fragment ids to all fragments in the fragments tree, but I have a randomized test failure when making sure that the insertions tree matches the state of the fragments tree.
2021-12-08 22:05:13 -07:00
Nathan Sobo
22d54442dc
Sketch in type-level changes to track insertion splits
2021-12-08 21:04:22 -07:00
Nathan Sobo
40626249cd
WIP
2021-12-08 20:04:30 -07:00
Nathan Sobo and Max Brunsfeld
66798f3be7
Get Editor compiling with MultiBuffer as its buffer
...
There's a bunch of unimplemented methods in MultiBuffer, but everything compiles.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-12-08 19:23:04 -07:00
Max Brunsfeld and Nathan Sobo
668c672db8
Implement Anchor, AnchorRangeMap, SelectionSet in multi_buffer
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-08 12:56:09 -08:00
0ba237f72c
Fill out ExcerptList API
...
This restores the improvements that we had made on the `project-diagnostics-generic` branch.
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-08 10:04:22 -08:00
Antonio Scandurra
6a6dcc0975
Remove lifetime parameter from TextDimension trait
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2021-12-08 09:45:57 -08:00
Max Brunsfeld
214354078e
Give more specific names to all snapshot and text iterator types
2021-12-08 09:24:00 -08:00
Max Brunsfeld
54713a04b6
Fix Subscription re-export after moving it into its own module
2021-12-06 17:40:17 -08:00
Nathan Sobo and Max Brunsfeld
91de6540a3
Implement ExcerptList::subscribe
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-12-06 13:37:17 -07:00
Nathan Sobo and Max Brunsfeld
88964bb5e2
Allow patches to be composed with edit iterators in addition to other Patches
...
This can avoid an extra allocation in some cases.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-12-06 13:00:51 -07:00
c3d8c3997f
Introduce Buffer::edits_since_in_range
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2021-12-06 19:48:45 +01:00
Antonio Scandurra
45198f646b
Start on a simple randomized test for FragmentList
2021-12-06 16:08:17 +01:00
Antonio Scandurra
141325d792
Start on maintaining edits in FragmentList
2021-12-06 12:10:25 +01:00
Nathan Sobo
43e8162eb2
Start on a new FragmentList
...
Here I'm exploring a new approach to the project-wide diagnostics view that can exactly mirror the contents of cargo check. The `FragmentList` composes an arbitrary list of fragments from other buffers and presents them as if they were a single buffer.
2021-12-04 06:57:56 -07:00
Antonio Scandurra and Nathan Sobo
9fb5b384dc
Use the new buffer subscription API to keep DisplayMap in sync
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-01 16:08:53 +01:00
Antonio Scandurra and Nathan Sobo
137a1969bd
Introduce text::Buffer::subscribe
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-01 15:55:05 +01:00
Antonio Scandurra
f849b33b2d
Don't produce invalid intermediate edits in Patch::compose
2021-12-01 11:44:33 +01:00
Max Brunsfeld and Nathan Sobo
80a05508ba
WIP - maintain foldmap with Buffer::edits_since
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-11-30 17:23:02 -08:00
Max Brunsfeld
a0cb583fcb
Use &Snapshot directly instead of impl Into<Content<'a>>
...
The text::Buffer and its snapshot already used the same representation
for their content, so we can just make Buffer deref to a Snapshot.
2021-11-30 13:32:11 -08:00
Nathan Sobo and Max Brunsfeld
811689d234
Rename buffer crate to text and name its entrypoint after the crate
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-11-30 12:26:12 -07:00