Antonio Scandurra
b4ebe179f9
Make local edit randomized tests pass with locators
2021-12-09 09:11:16 +01:00
Nathan Sobo
dd38eb1264
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
ec54010e3c
Sketch in type-level changes to track insertion splits
2021-12-08 21:04:22 -07:00
Nathan Sobo
98f726974e
WIP
2021-12-08 20:04:30 -07:00
Nathan Sobo
87d16c271e
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
daedf179b2
Implement Anchor, AnchorRangeMap, SelectionSet in multi_buffer
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-08 12:56:09 -08:00
Max Brunsfeld
5f8e406c18
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
a88cff4fa0
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
fa379885f1
Give more specific names to all snapshot and text iterator types
2021-12-08 09:24:00 -08:00
Max Brunsfeld
39cc0cac93
Fix Subscription re-export after moving it into its own module
2021-12-06 17:40:17 -08:00
Nathan Sobo
4578938ea1
Implement ExcerptList::subscribe
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-12-06 13:37:17 -07:00
Nathan Sobo
6965117dd8
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
Antonio Scandurra
42eba7268d
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
e37908cf3b
Start on a simple randomized test for FragmentList
2021-12-06 16:08:17 +01:00
Antonio Scandurra
45d6f5ab04
Start on maintaining edits in FragmentList
2021-12-06 12:10:25 +01:00
Nathan Sobo
811696670a
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
733e0cb21b
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
3b536f153f
Introduce text::Buffer::subscribe
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-01 15:55:05 +01:00
Antonio Scandurra
b841b3eb79
Don't produce invalid intermediate edits in Patch::compose
2021-12-01 11:44:33 +01:00
Max Brunsfeld
faba276fdc
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
924e1578ea
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
d3f28166cb
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