Previously we were using a function in `editor` to combine syntax
highlighting and fuzzy match positions, it would operate on the full
text as put into the label. However we now have a method `ranges` on
`StringMatch` itself which operates on just the match text.
The outline view has some pretty specific behavior around path/normal
matches and how they are highlighted. So let's just give the match the
full text before it leaves the search function so it can freely index
This PR adds support for copying diagnostics messages to the clipboard.
This was already working, but we were missing implementations
clipboard-related methods in the `TestPlatform` that were causing the
tests to fail when the copying functionality was added.
Release Notes:
- N/A
[[PR Description]]
- Add pane empty state
- Ensure tab bar doesn't resize when a tab is added
- Make ButtonLike respect the style of a disabled button
- Add additional cursors to gpui2
Release Notes:
- N/A
We've investigated another spurious failure, this time with test_multiple_excerpts_large_multibuffer; sadly it didn't really get us anywhere, so for now we're relaxing an assert.
Co-authored-by: Kirill <kirill@zed.dev>
Returned highlights were okay, but the test was trying to normalize the output by sorting the highlights by color. The ordering is different between gpui1 Color and gpui2 Hsla.
These tests failed due to an indefinite hang in buffer.condition in the following code:
\`\`\`rust
let buffer = cx
.add_model(|cx| Buffer::new(0, cx.model_id() as u64, text).with_language(language, cx));
buffer.condition(cx, |buf, _| !buf.is_parsing()).await;
`\`\`
In both gpui1 and gpui2 \`.with_language\` spawns a task that notifies the context once it's done. The \`condition\` waits for notifications to be raised. The gist of the problem was that in gpui2, the spawned task was scheduled straight away, so we never really saw the notification with \`condition\`, causing us to wait indefinitely. This is probably a difference in test between schedulers in gpui1 and gpui2, but I kind of sidestepped the issue by spawning a condition before firing off a parsing task with \`set_language\`.
- +language_selector2
- Language Selector 2 working!
- Prevent languages showing in wrong order first
- copilot_menu2 (though only tested offling, which is insufficient)
- Dismiss tooltips at capture
- Get ChannelModal opening
[[PR Description]]
Release Notes:
- N/A
This fixes a bug where it was possible to put the channel tree into a
bad state by accidentally dragging a channel into itself or one of its
descendants.
This PR extends `Button` with support for an optional icon to be
displayed next to the label.
As part of this, the functionality for displaying an icon within a
button has been factored out into an internal `ButtonIcon` component.
`ButtonIcon` is now used by both `IconButton` and `Button` to
encapsulate the concerns of an icon that is rendered within a button.
Release Notes:
- N/A
This PR adds a new `selected_label` method to `Button`.
This can be used to set a different label that should be rendered when
the `Button` is selected.
Release Notes:
- N/A
- Adds a placeholder `ButtonStyle::Tinted`.
- Note: Using this now will just give you a block of `gpui::red()`
- Documents ButtonLike and ButtonStyle to hopefully help make choosing a
button style easier.
Release Notes:
- N/A
This bug was my fault, something I changed months ago to be more
consistent with VS Code - really strange that it took months for someone
to find out spaces couldn't be used in the project panel.
~I didn't apply this fix to zed2 because I dont think the facilities are
in place to do so (@maxbrunsfeld, @mikayla-maki, is there a system in
place for this that I missed?). I did leave a TODO.~
Fix is now in zed 2.
Release Notes:
- Fixed a bug where spaces could not be inserted when editing file names
in the project panel
([#2308](https://github.com/zed-industries/community/issues/2308)).