Max Brunsfeld
214354078e
Give more specific names to all snapshot and text iterator types
2021-12-08 09:24:00 -08:00
Max Brunsfeld
aae2e52d14
Merge pull request #281 from zed-industries/fix-release-asset-redirects
...
Don't pass GH auth header when following redirects for release assets
2021-12-07 12:49:49 -08:00
Max Brunsfeld
8a49e9b98d
Don't pass GH auth header when following redirects for release assets
2021-12-07 12:34:55 -08:00
Max Brunsfeld
b220bf4a26
Fix assertion in excerpt unit test after fixing edits
2021-12-06 17:40:32 -08:00
Max Brunsfeld
54713a04b6
Fix Subscription re-export after moving it into its own module
2021-12-06 17:40:17 -08:00
Max Brunsfeld
d078c01b63
Implement and randomized test excerpt list point translation and clipping
2021-12-06 17:39:31 -08:00
Max Brunsfeld
8a28ebc03a
🎨 excerpt_list::Chunks::next
2021-12-06 16:28:44 -08:00
Max Brunsfeld
aff3a4d5ef
Get random excerpts test passing w/ text in range, edits
2021-12-06 16:17:31 -08:00
Nathan Sobo and Max Brunsfeld
0f82f12d35
WIP
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-12-06 14:51:23 -07:00
Nathan Sobo and Max Brunsfeld
26335dc776
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 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
a8734cd592
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 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
Nathan Sobo and Max Brunsfeld
9f33388a80
Rename FragmentList to ExcerptList
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-12-06 11:59:32 -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
2597ac9185
🎨
2021-12-06 14:03:38 +01:00
Antonio Scandurra
141325d792
Start on maintaining edits in FragmentList
2021-12-06 12:10:25 +01:00
Antonio Scandurra
7827aeff58
Merge branch 'main' into project-diagnostics
2021-12-06 09:39:03 +01:00
Antonio Scandurra
f1c0367223
Merge pull request #276 from zed-industries/markdown
...
Add basic markdown highlighting
2021-12-06 08:43:10 +01:00
Max Brunsfeld
df4e452e28
Add tree-sitter-markdown, set up simple markdown higlighting
2021-12-05 21:37:31 -08:00
Max Brunsfeld
f831277317
Upgrade tree-sitter to 0.20.1
2021-12-05 21:37:08 -08:00
Antonio Scandurra
f165854ff1
Merge pull request #275 from zed-industries/fix-selection-artifacts
...
Use 16-bit float to store path windings
2021-12-05 12:58:00 +01:00
Antonio Scandurra
0ad6b0c1f6
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
8fb0df07b7
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
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
102c1ec10d
Clear pending keystrokes after dispatching an action
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-03 17:59:46 +01:00
Antonio Scandurra and Nathan Sobo
4ca4313b49
In add_option_view, avoid bumping view's ref counts if view is None
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-03 17:52:39 +01:00
Max Brunsfeld
eff585310e
Merge pull request #273 from zed-industries/flexible-blocks
...
Render blocks as arbitrary elements
2021-12-01 17:18:45 -08:00
Nathan Sobo and Max Brunsfeld
8e3630df62
Fix alignment of blocks adjacent to other blocks
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-12-01 17:58:44 -07:00
Nathan Sobo and Max Brunsfeld
26ab95eae9
Get all tests passing with new blocks API
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-12-01 17:52:34 -07:00
Nathan Sobo and Max Brunsfeld
26a4b9cca6
Use new BlockMap API to render diagnostics
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-12-01 17:22:40 -07:00
Max Brunsfeld and Nathan Sobo
cf3093aace
Start work on generalizing the BlockMap to allow arbitrary elements
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-01 15:25:55 -08:00
Antonio Scandurra and Nathan Sobo
ca383df31e
Avoid allocating a Patch just to check if there are no edits
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-01 16:47:04 +01:00
Antonio Scandurra
7b696b42cf
Merge pull request #272 from zed-industries/fold-map-edits
...
Don't rely on `Buffer::edits_since` to keep `FoldMap` up-to-date
2021-12-01 16:42:34 +01: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
8bb9cb3953
Bump FoldMap's version in FoldMap::sync (and not in DisplayMap)
2021-12-01 12:05:02 +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
a282abc0d1
Merge pull request #269 from zed-industries/simplify-buffer-content
...
Use `&'a Snapshot` directly instead of `impl Into<Content<'a>>`
2021-11-30 13:48:15 -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
Max Brunsfeld
0b8f4ec12e
Merge pull request #268 from zed-industries/improve-file-navigation
...
Improve file navigation by naming the root of every crate after the crate itself
2021-11-30 12:04:07 -08:00
Nathan Sobo and Max Brunsfeld
93322a4858
Name the root file of every crate after the crate to ease navigation
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-11-30 12:46:39 -07:00
Nathan Sobo and Max Brunsfeld
087fe38e38
Fix warning
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-11-30 12:27:00 -07: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
Nathan Sobo
71a08ab719
Bump versions in preparation for release
2021-11-30 09:43:51 -07:00
Nathan Sobo
f1eb7c1c03
Merge pull request #267 from zed-industries/fix-soft-wrap-disabled
...
Avoid building up pending edits when soft wrapping is disabled
2021-11-30 08:39:00 -07:00
Nathan Sobo and Antonio Scandurra
539698ec40
Avoid building up pending edits when soft wrapping is disabled
...
This was causing us to get slower over time as we stacked up hundreds of thousands of pending edits whenever soft wrap was disabled.
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2021-11-30 08:28:29 -07:00
Antonio Scandurra
4dd9b80375
Merge pull request #266 from zed-industries/fix-go-to-line
...
Use display coordinates for the highlighted row in "go to line"
2021-11-30 11:55:00 +01:00