Antonio Scandurra
e95eab89f4
Remove stray log statement
2021-12-14 12:01:19 +01:00
Antonio Scandurra
f519000b57
Implement MultiBufferSnapshot::remote_selections_in_range
2021-12-14 11:34:26 +01:00
Antonio Scandurra
c065fdc08e
Assume all excerpts in the multi buffer have the same language for now
2021-12-14 11:33:53 +01:00
Antonio Scandurra
f493b6d308
Keep a separate diagnostic update count and parse count in MultiBuffer
2021-12-14 11:32:49 +01:00
Antonio Scandurra
96291408bd
Display a rudimentary project diagnostic view on alt-shift-d
2021-12-14 11:32:05 +01:00
Max Brunsfeld
4dc84c6dca
WIP
2021-12-13 17:44:20 -08:00
Max Brunsfeld
7252edb22a
Add Project::open_buffer method
2021-12-13 17:44:15 -08:00
Max Brunsfeld
1bbc223cc3
Store diagnostic summaries on worktrees
2021-12-13 16:36:53 -08:00
Max Brunsfeld
b1a1f84dea
Handle buffer deduping in the worktree instead of in workspace
...
Previously, buffers were only deduped by file if they were opened
through Workspace::open_entry
2021-12-13 16:35:46 -08:00
Max Brunsfeld and Nathan Sobo
125adca342
Get tests passing after diagnostic + selection changes
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-13 11:34:56 -08:00
df57433d59
Get things compiling with diagnostics on worktree
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-13 11:15:03 -08:00
Antonio Scandurra and Nathan Sobo
e3bf3af3f5
WIP
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-13 16:46:35 +01:00
Antonio Scandurra and Nathan Sobo
4edc9d4bf4
First attempt at implementing MultiBuffer::edit_internal
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-13 15:43:26 +01:00
Antonio Scandurra
52a5bfa4c8
Show remote collaborators' active selections
2021-12-13 11:38:38 +01:00
Antonio Scandurra
d53322bd05
Write a simple unit test for TreeMap and fix bug in remove
2021-12-13 11:20:10 +01:00
Nathan Sobo
b00acf619a
Test undo/redo at editor layer, including selection restoration
2021-12-12 15:04:19 -07:00
Nathan Sobo
ede5b1839d
Restore selections upon undo/redo of edits performed in the current editor
2021-12-12 14:12:03 -07:00
Nathan Sobo
d3dc0ca59a
Get selections rendering again when local selections are owned by Editor
2021-12-11 13:42:46 -07:00
Nathan Sobo
9836638fb5
More messy progress towards selections in editors
2021-12-11 00:29:34 -07:00
Nathan Sobo
1078299acc
Relax TreeMap value bounds, fix warnings, simplify cmp
2021-12-10 23:35:24 -07:00
Nathan Sobo
ce4c84ca70
Introduce sum_tree::TreeMap<K, V>
...
I think this will be useful to avoid cloning HashMaps in certain cases such as snapshots.
2021-12-10 23:33:15 -07:00
Nathan Sobo
8132548290
WIP
2021-12-10 22:16:39 -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
Nathan Sobo
271b092ec1
Move multi_buffer to editor crate
2021-12-10 17:37:53 -07:00
Max Brunsfeld and Nathan Sobo
df8c24583e
Get tests passing w/ multibuffer in editor
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-10 15:54:25 -08:00
Max Brunsfeld and Nathan Sobo
4b3bb3e692
Update multibuffer when buffers' syntax trees or diagnostics change
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-10 15:54:06 -08:00
Max Brunsfeld
f6909fd9df
Don't append a trailing newline in singleton MultiBuffer
2021-12-10 14:27:58 -08:00
Max Brunsfeld
bb6f9a6936
Fill in some missing methods on MultiBuffer, MultiBufferSnapshot
2021-12-10 14:27:04 -08:00
Antonio Scandurra and Nathan Sobo
f529f3ec6f
Start making MultiBuffer work with a singleton buffer
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-10 18:04:11 +01:00
Antonio Scandurra and Nathan Sobo
cced16aa49
Get everything compiling again
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-10 17:15:16 +01:00
Antonio Scandurra and Nathan Sobo
f019700264
WIP
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-10 16:14:12 +01: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
7080d66f1e
Fix diagnostic unit test
2021-12-10 09:43:21 +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
cbb2f5cbc7
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 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