Max Brunsfeld
ef52932a63
Add a unit test for navigation behavior at the editor level
2022-01-18 16:25:22 -08:00
Max Brunsfeld
babaabb941
Push to navigation history based on jump distance instead of time
2022-01-18 15:02:49 -08:00
Antonio Scandurra
d7d30d3303
Experiment with a more general way of pushing editor navigation entries
2022-01-18 18:03:10 +01:00
Antonio Scandurra
ec7a343f4f
Introduce a test to verify navigation
2022-01-18 10:03:56 +01:00
Antonio Scandurra
f9ebc363a2
Use offset to restore navigation position if anchor can't be resolved
2022-01-18 09:59:28 +01:00
Max Brunsfeld
25b150c560
Navigate to previous positions in editors when using navigation history
2022-01-17 16:01:52 -08:00
Antonio Scandurra and Max Brunsfeld
3f2ea66672
Populate backward/forward stacks upon item deactivation
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2022-01-17 18:57:31 +01:00
Antonio Scandurra
d1f435bcdc
Start laying the foundation for a per-pane navigation system
2022-01-17 16:59:06 +01:00
e1bf476b29
Add select_first and select_last bindings to outline view
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-14 10:45:37 -08:00
499671b2c3
Match on names only when outline query has no spaces
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-14 09:16:29 -08:00
Antonio Scandurra
4956298db4
Allow matching of context items in outline view
2022-01-14 11:09:02 +01:00
Max Brunsfeld
3dd4c39edd
Incorporate syntax highlighting into symbol outline view
...
Still need to figure out how to style the fuzzy match characters
now that there's syntax highlighting. Right now, they are
underlined in red.
2022-01-13 18:10:02 -08:00
Max Brunsfeld
09cc3bd94d
Include highlighting runs in Outline
2022-01-13 14:46:15 -08:00
Max Brunsfeld
a1a9c9356d
Allow multiple disjoint nodes to be captured as matcheable in the outline query
2022-01-13 14:04:25 -08:00
Max Brunsfeld and Antonio Scandurra
18907b85d2
Change Editor::set_highlighted_row to take a row range
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2022-01-13 09:49:46 -08:00
Antonio Scandurra and Max Brunsfeld
2d08f4fba7
Select the closest outline item when the outline view's query is empty
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2022-01-13 18:43:49 +01:00
Antonio Scandurra and Max Brunsfeld
fad016d316
Return Outline<Anchor> from MultiBuffer::outline
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2022-01-13 18:24:00 +01:00
Max Brunsfeld and Nathan Sobo
72a4ddd689
Add Buffer::outline method
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-12 18:17:49 -08:00
Max Brunsfeld and Nathan Sobo
85b87780ea
Adjust BlockMap tests to reflect new tiebreaking behavior
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-12 12:11:55 -08:00
Max Brunsfeld and Nathan Sobo
024ffdeafe
Show error+warning counts in project diagnostics tab
...
Allow workspace items' tab contents to be arbitrary elements
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-12 10:51:28 -08:00
Max Brunsfeld and Nathan Sobo
5a0ebbfd08
Ensure path headers appear before first diagnostic header
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-12 10:51:28 -08:00
Max Brunsfeld
8442bdb3ab
Tweak theming of project diagnostics
2022-01-12 10:51:08 -08:00
Max Brunsfeld
e21914a059
Deduplicate path names in the project diagnostics view
2022-01-12 10:51:08 -08:00
Max Brunsfeld
291cad9da7
Expand block decorations' bounds to include the gutter
2022-01-12 10:51:08 -08:00
Antonio Scandurra and Nathan Sobo
f883ffb4f2
Implement Buffer::format
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-12 18:01:20 +01:00
Antonio Scandurra
8b13462bce
Process selection anchors in a sorted fashion when refreshing them
2022-01-12 09:28:09 +01:00
Antonio Scandurra
9ea4ed245f
Add unit test reproducing a panic when refreshing selections
2022-01-12 09:27:03 +01:00
Antonio Scandurra
8fb0ebe389
Don't return a Result in test-only method select_display_ranges
2022-01-12 09:14:48 +01:00
a38d391283
Fix cursor position when inserting newlines on a repeated excerpt
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2022-01-11 18:30:25 +01:00
Antonio Scandurra and Nathan Sobo
d9a870ee21
Ensure selections stay sorted after refreshing them
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-11 17:16:45 +01:00
Antonio Scandurra and Nathan Sobo
848016e6b3
Verify Anchor::buffer_id before resolving it or comparing it
...
This commit also verifies some properties about anchor resolution in the
multibuffer randomized test.
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-11 16:40:12 +01:00
Antonio Scandurra
83e078ef0b
Fix outdent not working when cursor is at column 0
2022-01-10 15:32:28 +01:00
Antonio Scandurra
dc0714a27d
Correctly report line boundaries when a map contains both folds and wraps
...
This fixes the randomized test failures that were occurring on main.
2022-01-10 11:26:48 +01:00
Max Brunsfeld
dfab726dd9
When selections lose their excerpts, move them to the next primary diagnostic
2022-01-07 14:53:33 -08:00
Max Brunsfeld and Nathan Sobo
4b7584e1a2
Reuse views when moving between diagnostic view and editors
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-07 11:00:12 -08:00
Max Brunsfeld and Nathan Sobo
4ca8d56b7f
Finish implementing ProjectDiagnostics::open_excerpts
...
* Build workspace item views with a reference to the workspace
* Add randomized test for MultiBuffer::excerpted_buffers and fix a small bug
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-07 09:59:27 -08:00
Antonio Scandurra and Nathan Sobo
2877e37001
Use Buffer handles instead of MultiBuffer as editor workspace items
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-07 17:48:31 +01:00
Antonio Scandurra and Nathan Sobo
c28fd392cb
Refactor opening workspace items
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-07 17:38:37 +01:00
Antonio Scandurra and Nathan Sobo
7ebeddd2c2
WIP: Add keybinding to open buffers under cursors
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-07 16:12:50 +01:00
Antonio Scandurra
8ed2231de0
Clear selections on other excerpted buffers when setting active selections
2022-01-07 10:19:28 +01:00
Max Brunsfeld
d9f725e20a
Give a full-width background to the diagnostic headers
2022-01-06 17:55:56 -08:00
Max Brunsfeld and Nathan Sobo
3f2f57b77d
Keep selections at the top of the project diagnostics view when it is first populated
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-06 17:01:13 -08:00
Nathan Sobo and Max Brunsfeld
df5b181ad8
Send diagnostic summaries to guests when they join the project
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2022-01-06 12:12:09 -07:00
Nathan Sobo and Antonio Scandurra
80e5915179
Allow disk-based diagnostic progress begin/end events to interleave
...
When multiple saves occur, we can have multiple start events followed by multiple end events. We don't want to update our project diagnostics view until all pending progress is finished.
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2022-01-06 09:32:08 -07:00
Antonio Scandurra and Nathan Sobo
a56b3c7fb9
Polish rendering of inline errors
...
- Don't soft-wrap
- Render multiple lines
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-06 16:17:53 +01:00
Antonio Scandurra
3ec22e7581
Wire up refresh_anchors in Editor::refresh_selections and call it
2022-01-06 15:32:37 +01:00
Max Brunsfeld
f2273252b1
WIP - MultiBuffer::refresh_anchors
2022-01-05 21:12:49 -08:00
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
2879a402ca
Don't scroll editors away from the top of their buffer when content changes
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-05 12:31:00 -08:00