Antonio Scandurra
da09247e5e
WIP
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-10 16:14:12 +01:00
Antonio Scandurra
9c74deb9ec
Finish removing anchor collections from MultiBuffer
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-10 15:58:37 +01:00
Antonio Scandurra
d9da8effd4
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
c8d5e19492
Merge branch 'fragment-locators' into project-diagnostics
2021-12-10 14:01:17 +01:00
Antonio Scandurra
cb97b7cd1d
Fix diagnostic unit test
2021-12-10 09:43:21 +01:00
Antonio Scandurra
eeba0993aa
Optimize anchor comparison and take full advantage of fragment IDs
2021-12-10 09:16:58 +01:00
Max Brunsfeld
5e516f59c0
Merge branch 'fragment-locators' into HEAD
2021-12-09 14:49:04 -08:00
Max Brunsfeld
1ed1ec21dd
Batch anchor resolution, avoid cloning fragment ids when seeking
2021-12-09 11:00:40 -08:00
Antonio Scandurra
e9c385e7a6
WIP
2021-12-09 18:27:54 +01:00
Antonio Scandurra
91a7bbbba2
Fix some of the diagnostic tests and make DiagnosticEntry generic
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-09 17:53:08 +01:00
Antonio Scandurra
65711b2256
Remove anchor collections
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-09 17:28:27 +01:00
Antonio Scandurra
67686dd1c2
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
cbe136c0cb
Implement anchor resolution using locators
2021-12-09 11:18:01 +01:00
Antonio Scandurra
b7535dfba4
Store only clock::Local
in InsertionFragment
2021-12-09 09:21:52 +01:00
Antonio Scandurra
dc81b5f57a
Make remote edit randomized tests pass with locators
2021-12-09 09:15:19 +01:00
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
4ee404a0af
Take a cx in MultiBuffer::start_transaction
2021-12-08 19:30:52 -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
a7634ccd5f
Rename ExcerptList to MultiBuffer
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-08 10:07:15 -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
6a44a7448e
Consolidate Edit types in editor crate
2021-12-08 09:33:55 -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
6d9bf802e2
Don't pass GH auth header when following redirects for release assets
2021-12-07 12:34:55 -08:00
Max Brunsfeld
ad33111a22
Fix assertion in excerpt unit test after fixing edits
2021-12-06 17:40:32 -08:00
Max Brunsfeld
39cc0cac93
Fix Subscription re-export after moving it into its own module
2021-12-06 17:40:17 -08:00
Max Brunsfeld
102926d171
Implement and randomized test excerpt list point translation and clipping
2021-12-06 17:39:31 -08:00
Max Brunsfeld
09c0c3a0e7
🎨 excerpt_list::Chunks::next
2021-12-06 16:28:44 -08:00
Max Brunsfeld
416033a01c
Get random excerpts test passing w/ text in range, edits
2021-12-06 16:17:31 -08:00
Nathan Sobo
02f42f2877
WIP
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-12-06 14:51:23 -07:00
Nathan Sobo
88e3d87098
Get randomized test passing on basic excerpt list features
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-12-06 13:48:07 -07: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
a02a29944c
Get the basic ExcerptList unit test passing again
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-12-06 13:01:09 -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
Nathan Sobo
cff610e1ec
Rename FragmentList to ExcerptList
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-12-06 11:59:32 -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
8354d1520d
🎨
2021-12-06 14:03:38 +01:00
Antonio Scandurra
45d6f5ab04
Start on maintaining edits in FragmentList
2021-12-06 12:10:25 +01:00
Antonio Scandurra
8f90d42723
Merge branch 'main' into project-diagnostics
2021-12-06 09:39:03 +01:00
Max Brunsfeld
b1ed9c88a4
Add tree-sitter-markdown, set up simple markdown higlighting
2021-12-05 21:37:31 -08:00
Max Brunsfeld
026c3476db
Upgrade tree-sitter to 0.20.1
2021-12-05 21:37:08 -08:00
Antonio Scandurra
45d1690f6e
Use 16-bit float to store path windings
...
Previously, we were using a normalized 8-bit unsigned integer which forced us
to represent each increment of the winding number as a fraction of the max
value (1 / 255) which we would then add up using additive alpha blending.
This had three major drawbacks:
- The max winding number could not be greater than 255.
- Adding up (1 / 255) several times could result in a loss of precision.
- Due to also computing anti-aliasing as a fractional winding number, we had to
reduce the max winding number to 32. This was still not good enough because
we would multiply a fractional value with `1 / 32`, thus introducing more and
more loss of precision.
This commit changes the texture type to an `f16` which doesn't require the
division by 255 and enables greater precision in the computation of the
anti-aliased parts of a curve. Note how this also removes the limitation of 255
windings at most per curve. The tradeoff is paying twice as much memory for
storing the texture, but that seems totally valid to achieve rendering accuracy.
Note that this kind of texture should be compatible with WebGL2 once we start
working on a web version of Zed.
2021-12-05 11:17:26 +01:00
Nathan Sobo
0be897d5ac
WIP: Edit one of the excerpted buffers and add an assertion
...
We'll need to detect edits on the child buffers and understand their impact on the tree.
2021-12-04 07:19:30 -07: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
3426d46b69
Clear pending keystrokes after dispatching an action
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-03 17:59:46 +01:00