f6263768b3
WIP: interpolate edits into snapshot coming from BackgroundWrapper
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2021-07-20 19:21:52 +02:00
Antonio Scandurra
3d8c59af31
Implement Snapshot::interpolate
2021-07-20 14:25:56 +02:00
Antonio Scandurra
b66de06d0e
Ensure that WrapMap's input lines match TabMap's output lines
2021-07-20 11:30:00 +02:00
Antonio Scandurra
d0113a114c
Coalesce contiguous isomorphic transforms
2021-07-20 11:27:12 +02:00
Antonio Scandurra
3d845f81b1
Remove stray logging statements
2021-07-20 11:10:02 +02:00
Antonio Scandurra
39b73496cb
Make randomized tests pass with one operation
2021-07-20 11:06:17 +02:00
Nathan Sobo and Max Brunsfeld
3b77b011e2
Iterate on randomized wrapping test and fix some bugs
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-19 19:31:03 -06:00
Nathan Sobo and Max Brunsfeld
e0da3fd714
Get the randomized soft wrap test passing with no edits
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-19 18:37:29 -06:00
Nathan Sobo and Max Brunsfeld
2ce42ff6b6
Honor the last line when wrapping even if it doesn't end in \n
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-19 18:29:20 -06:00
Max Brunsfeld and Nathan Sobo
f9e13f3429
Start work on WrapMap::chunks_at
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-19 16:23:56 -07:00
Max Brunsfeld
8e9a5e072d
Fix typo in Point::add_assign
2021-07-19 13:28:35 -07:00
Nathan Sobo
e193a660aa
WIP
2021-07-19 13:59:07 -06:00
Antonio Scandurra and Nathan Sobo
5a33612f0f
WIP
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-19 19:34:41 +02:00
Antonio Scandurra and Nathan Sobo
631a6a2f45
Re-enable wrap_map module and fix compile errors
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-19 18:40:57 +02:00
Antonio Scandurra and Nathan Sobo
359132ac19
Extract tab expansion logic into TabMap
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-19 17:29:03 +02:00
Antonio Scandurra and Nathan Sobo
5a0d156cc5
Clarify input and output coordinates in display_map
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-19 16:18:20 +02:00
Antonio Scandurra
e00eafb3e8
WIP
2021-07-19 15:45:49 +02:00
Antonio Scandurra
9e448e694d
Add fold_map::Snapshot::text_summary_for_range
2021-07-19 12:25:27 +02:00
Antonio Scandurra
7a86a2c831
Change fold_map::Edit to return DisplayOffsets
...
This is needed so that we can translate display offsets into display
points in the `WrapMap`.
2021-07-19 11:34:47 +02:00
Antonio Scandurra
38dffc310f
Fix errors in WrapMap randomized tests
2021-07-19 10:48:13 +02:00
Antonio Scandurra
9895c77f5c
WIP
2021-07-16 18:43:50 +02:00
Antonio Scandurra and Nathan Sobo
1ba9e48271
Start on adding a randomized test for BackgroundWrapper
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-16 17:53:23 +02:00
Antonio Scandurra
8d3c3d7c46
Work on a randomized test for edits/snapshots returned by FoldMap
...
...and make it pass too!
2021-07-16 15:48:43 +02:00
Antonio Scandurra
831b620e51
Make writing/reading FoldMap explicit so that we can retrieve edits
2021-07-16 13:49:38 +02:00
Antonio Scandurra
23b55d88d9
Pull snapshot history out of fold map
2021-07-16 13:49:02 +02:00
Max Brunsfeld
e0930ddc09
Add FoldMapSnapshot::edits_since_creation
2021-07-15 18:27:59 -07:00
Nathan Sobo and Max Brunsfeld
8b34deab58
Try to return edits from FoldMap::apply_edits
...
The goal is to describe how the fold map changed. Hopefully this is correct.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-15 15:08:18 -06:00
Nathan Sobo and Max Brunsfeld
2c9f730638
Give the FoldMap its own edit type that does not have deleted_lines
...
We want to use this struct to communicate about edits performed to the fold map itself, and it will be simpler if we don't have to communicate this data.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-15 14:19:58 -06:00
Max Brunsfeld
f561f33aa9
Move DisplayMap's reading methods to DisplayMapSnapshot
2021-07-15 11:48:57 -07:00
Nathan Sobo and Max Brunsfeld
2bde54971e
Move all FoldMap query methods to FoldMapSnapshot
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-15 11:36:24 -06:00
Nathan Sobo
09afba9251
Introduce buffer::Content<'a> struct to share logic with buffer::Snapshot
...
We want to move a bunch of methods on FoldMap to fold_map::Snapshot. This captures a buffer snapshot, and we'll need a bunch of methods that currently are on Buffer to also be implemented on buffer::Snapshot. This Content reference struct will be a good zero-cost place to store that logic.
2021-07-15 09:50:50 -06:00
Antonio Scandurra
be954872d0
Calculate an old_lines range in Edits iterator
2021-07-15 10:11:24 +02:00
Antonio Scandurra
c2e7460fcd
WIP
2021-07-14 19:09:46 +02:00
Antonio Scandurra
a5edc14e3a
WIP: Start on WrapMap
2021-07-14 18:43:48 +02:00
Max Brunsfeld
7260442d42
Move the fs module out of worktree
2021-07-13 15:40:11 -07:00
391ad489ff
Rename zed-rpc to zrpc
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2021-07-13 18:22:00 +02:00
Antonio Scandurra
2ecdc65f38
WIP
2021-07-13 16:36:35 +02:00
Max Brunsfeld and Nathan Sobo
2a90347b82
Store an Fs on Workspace, pass it to each Worktree
...
Push test-only worktree behavior down into the Fs,
via a `watch` method which provides fs events.
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-07-12 17:26:14 -07:00
Antonio Scandurra
34abda3a04
🔥 Remove stray logging statements
2021-07-12 17:52:16 +02:00
Max Brunsfeld
eeebc761b6
Restructure Peer to handle connections' messages in order
2021-07-09 16:27:34 -07:00
Antonio Scandurra
d82411e539
Relay the saved mtime when saving a buffer
2021-07-08 15:49:41 +02:00
Antonio Scandurra
2a779d3529
Rename {Add,Remove}Guest to {Add,Remove}Peer
2021-07-05 10:24:39 +02:00
Antonio Scandurra
569a4a1e2d
WIP: Save remote buffers
2021-07-02 17:02:17 +02:00
Antonio Scandurra
7ae1d9e997
Send also the currently active selection sets when serializing a buffer
2021-07-02 11:29:36 +02:00
Antonio Scandurra
da7bd8439b
Report SelectionSet deletion operations correctly
2021-07-01 12:54:16 +02:00
Antonio Scandurra
c881c7f30f
Start on rendering remote selections
2021-07-01 11:21:43 +02:00
Antonio Scandurra
7704291432
Maintain a set of peers as they join and leave the worktree
2021-06-30 13:22:22 +02:00
Nathan Sobo
bbf803d7dc
Store a reference to the LangageRegistry on the Worktree
2021-06-29 20:07:37 -06:00
34963ac80d
Use entry_id on File instead of worktree::Diff to detect when buffers' files change
...
Rather than computing a diff after processing a batch of FSEvents, we instead detect renames as we're inserting entries. We store an entry_id on the File object that is owned by each buffer, and use this to detect when the path of the File has changed.
We now also manage all File-related state and event emission for Buffers in the LocalWorktree, since the logic will need to be totally different in the remote case.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2021-06-29 18:19:38 -06:00
Antonio Scandurra
e80439daaa
Merge branch 'main' into rpc
2021-06-29 10:25:42 +02:00