Max Brunsfeld
4535c2e99d
Merge branch 'main' into polish-project-diagnostics
2022-01-05 20:38:20 -08:00
Max Brunsfeld and Nathan Sobo
75170a078f
Fix Global::gt and rename it to changed_since
...
A false negative return value of `gt` was preventing guests' multibuffers from
syncing correctly.
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-05 17:36:12 -08:00
Max Brunsfeld and Nathan Sobo
75ac4f8925
Fix panic when resolving anchors after an excerpt id has been recycled
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-05 11:28:49 -08:00
Antonio Scandurra and Max Brunsfeld
7525741533
Merge branch 'main' into polish-project-diagnostics
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2022-01-04 18:35:28 +01:00
Antonio Scandurra
dd5ba61ab6
Rip out "diagnostic providers"
2022-01-04 16:32:17 +01:00
Antonio Scandurra
9e9eb32e5d
Capture a new buffer snapshot for excerpts whose selections got updated
2022-01-04 12:22:51 +01:00
Max Brunsfeld and Nathan Sobo
9838df770f
Add MultiBufferSnapshot::range_contains_excerpt_boundary
...
Use this method to disable move_line_down across excerpt boundaries.
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-27 17:08:31 -08:00
Antonio Scandurra
ae276700d6
Implement Buffer::diagnostic_group
2021-12-24 12:08:55 +01:00
Antonio Scandurra
85d495aa33
Remove BufferState when the last buffer's excerpt is removed
2021-12-23 09:59:39 +01:00
Max Brunsfeld
401791cc75
Fix remove_excerpts when removing the last N excerpts, N > 1
...
Also, generalize the randomized test to remove multiple excerpts at a time
2021-12-22 21:02:20 -08:00
Max Brunsfeld
8c37f7c519
Implement MultiBuffer::insert_excerpt_after
2021-12-22 17:59:44 -08:00
Max Brunsfeld
4be5dcff9e
Remove unused multi_buffer::FromAnchor trait
2021-12-22 13:27:43 -08:00
Max Brunsfeld
1491cc23d3
Revert "Implement MultiBuffer::remove_excerpts by inserting tombstones"
...
This reverts commit d1b15cd060 .
2021-12-22 10:18:33 -08:00
Antonio Scandurra
d1b15cd060
Implement MultiBuffer::remove_excerpts by inserting tombstones
...
This will make it easier to use anchors in the presence of deletes.
2021-12-22 17:57:36 +01:00
Max Brunsfeld
7790112f4b
Implement MultiBuffer::remove_excerpts
...
We'll need this for updating project diagnostics
2021-12-21 15:25:57 -08:00
Max Brunsfeld
11a46e978b
Avoid repeated subscriptions + clones when adding another excerpt for same buffer
2021-12-21 14:28:23 -08:00
Max Brunsfeld
a61bb80ccd
Fix maintenance of MultiBuffer's buffer states
2021-12-21 13:07:43 -08:00
Max Brunsfeld
5884a78267
Index max buffer row on MultiBuffer
2021-12-21 12:36:46 -08:00
Max Brunsfeld
3bf003a6cc
Remove header heights from multibuffer randomized test
2021-12-21 10:24:01 -08:00
Antonio Scandurra and Max Brunsfeld
c122723122
Render excerpt headers using DisplayMap::insert_blocks
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2021-12-21 18:32:27 +01:00
Antonio Scandurra
4521b576c8
Don't insert headers in MultiBuffer
...
This lays the groundwork to insert headers in the block map instead.
2021-12-21 16:38:18 +01:00
Antonio Scandurra and Nathan Sobo
9a59caff50
Gracefully degrade diagnostics_in_range, diagnostic_group and file
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-17 16:37:12 +01:00
Antonio Scandurra
34c3c8f595
Implement MultiBuffer::save
...
This is still not integrated with `workspace::ItemView`.
2021-12-17 16:11:18 +01:00
Antonio Scandurra
3dc1435ddc
Implement MultiBuffer::{is_dirty,has_conflict}
2021-12-17 15:33:09 +01:00
Antonio Scandurra
a35d60ee91
Implement MultiBuffer::enclosing_bracket_ranges
2021-12-17 15:05:05 +01:00
Antonio Scandurra
f280e8c6f1
Implement MultiBuffer::range_for_syntax_ancestor
2021-12-17 14:57:42 +01:00
Antonio Scandurra
647a5cb5d3
Make MultiBuffer::is_parsing a test-only method
2021-12-17 14:57:24 +01:00
Max Brunsfeld
72f9b28337
Don't terminate on an empty input chunk in ExcerptChunks
2021-12-16 16:05:28 -08:00
Max Brunsfeld
2c2313311a
Integrate MultiBuffer::buffer_rows into the display map
2021-12-16 13:53:32 -08:00
Max Brunsfeld
ed32b7d257
Implement MultiBuffer::buffer_rows
2021-12-16 12:17:47 -08:00
Max Brunsfeld and Antonio Scandurra
f1aef7e4b5
Resolve Anchor::min and ::max to valid positions
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2021-12-16 10:25:09 -08:00
Antonio Scandurra
5f2ebe12eb
Allow specifying MAX_EXCERPTS via an env variable in random tests
2021-12-16 12:28:54 +01:00
Max Brunsfeld
072467bcf0
Allow multibuffer to clip to the ends of excerpts, before trailing newlines
2021-12-15 17:04:57 -08:00
Max Brunsfeld
b30e6097ba
Update all MultiBuffer unit tests, removing expected trailing newline
2021-12-15 17:04:57 -08:00
Max Brunsfeld
9590cab2c8
Fix handling of excerpts surrounded by edits in MultiBuffer::edit
2021-12-15 12:12:39 -08:00
2fdf3937b3
Ensure muiltibuffer anchors are contained within their excerpt ranges
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2021-12-15 10:52:27 -08:00
Antonio Scandurra and Nathan Sobo
bf0166bc90
Re-enable multi-byte random character generation
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-15 17:51:11 +01:00
Antonio Scandurra and Nathan Sobo
d2e930695a
Overhaul MultiBuffer::chunks
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-15 17:22:04 +01:00
Antonio Scandurra and Nathan Sobo
c20eecb3ea
Allow edits at the end of MultiBuffer
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-15 16:45:01 +01:00
Antonio Scandurra and Nathan Sobo
92fa15ebd1
Don't insert a newline after the last excerpt of a MultiBuffer
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-15 16:39:09 +01:00
Antonio Scandurra and Nathan Sobo
f12e983c3e
Start testing the integration of display layers with MultiBuffers
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-15 16:05:26 +01:00
Antonio Scandurra and Nathan Sobo
c4f874c128
Forward notifications from Buffer in MultiBuffer
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2021-12-15 15:07:42 +01:00
Nathan Sobo and Antonio Scandurra
7991cbf31b
Remove assertion and don't consume 0 bytes
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2021-12-15 06:52:37 -07:00
Nathan Sobo and Antonio Scandurra
c3c8a6e8e4
Implement MultiBuffer::bytes_in_range
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2021-12-15 06:49:10 -07:00
Antonio Scandurra
3e1dbef5d1
WIP
2021-12-15 13:20:11 +01:00
Antonio Scandurra
5b3482b177
Implement MultiBuffer::reversed_chars_at
2021-12-15 10:06:45 +01:00
Antonio Scandurra
afa969b05c
Fix panic on creation of a left-biased anchor at the end of MultiBuffer
2021-12-15 10:06:43 +01:00
Nathan Sobo and Max Brunsfeld
33ac740f31
Group diagnostics by primary
...
Render primary message above the excerpt and supporting messages as block decorations with a `Below` disposition. This is still super rough.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-12-14 18:26:42 -07:00
Nathan Sobo and Max Brunsfeld
855592babc
Implement MultiBufferSnapshot::excerpt_headers_in_range
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-12-14 16:24:48 -07:00
Max Brunsfeld
7db6db3e0e
Fix multibuffer anchors before the ends of excerpts
2021-12-14 13:37:05 -08:00