Commit Graph
15145 Commits
Author SHA1 Message Date
Piotr Osiewicz b3e741b397 Fix up test_highlighted_ranges
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.
2023-12-04 13:47:50 +01:00
Piotr Osiewicz 1a5f6f604b Uncomment & fix up test_transpose 2023-12-04 13:42:48 +01:00
Piotr Osiewicz 0f7fc8c1a0 fix display map tests
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\`.
2023-12-04 13:14:03 +01:00
Piotr Osiewicz 9ffe78d264 Fix up random wrap map test 2023-12-04 12:10:01 +01:00
Piotr Osiewicz d81fb3680e Uncomment copilot2 tests 2023-12-01 22:04:43 +01:00
Piotr Osiewicz be509a5ce0 test_clipboard 2023-12-01 20:50:30 +01:00
Piotr Osiewicz 0a1765b01f test_following_with_multiple_excerpts (passes) 2023-12-01 20:32:12 +01:00
Piotr Osiewicz a985b7aab4 test_following (passes :)) 2023-12-01 20:25:47 +01:00
Piotr Osiewicz 20ae58eddd Bunch of new tests 2023-12-01 20:23:34 +01:00
Piotr Osiewicz 9408eecb6e test_navigation_history (pass) 2023-12-01 20:17:41 +01:00
Piotr Osiewicz 2ab84b81da test_edit_events 2023-12-01 20:16:40 +01:00
Piotr Osiewicz e821e1fc35 Display map tests (3 flaky tests for chunks) 2023-12-01 20:14:14 +01:00
Piotr Osiewicz 237efc841e Another batch of tests 2023-12-01 19:39:53 +01:00
Piotr Osiewicz 1c52b936bc Uncomment flaky tests 2023-12-01 19:21:30 +01:00
Piotr Osiewicz 53f3f960d2 Another batch of tests 2023-12-01 18:43:44 +01:00
Piotr Osiewicz 4c4ec221af Uncomment a bunch of tests in the editor 2023-12-01 18:11:27 +01:00
Piotr OsiewiczandAntonio e0ccaa60ff editor tests: Reintroduce block_on_ticks.
Co-authored-by: Antonio <antonio@zed.dev>
2023-12-01 17:24:47 +01:00
Piotr Osiewicz a40a5fb212 Revert "editor tests: Reintroduce block_on_ticks."
This reverts commit aed11ee8cb.
2023-12-01 17:24:20 +01:00
Piotr OsiewiczandAntonio aed11ee8cb editor tests: Reintroduce block_on_ticks.
Co-authored-by: Antonio <antonio@zed.dev>
2023-12-01 17:22:12 +01:00
Antonio Scandurra 134f3eb79f Add mouse context menu to editor2 (#3473)
We observed some weird behavior in `ContextMenu`, specifically:

- It seems like we don't intercept actions that have been dispatched,
which causes the context menu to stay open.
- The key bindings for editor actions in the context menu seem to come
from Vim

Release Notes:

- N/A
2023-12-01 16:25:07 +01:00
Antonio ScandurraandPiotr 5fefc121bf Add mouse context menu to editor2
Co-Authored-By: Piotr <piotr@zed.dev>
2023-12-01 16:01:56 +01:00
Antonio Scandurra 9fedb4c7ee Get editor2 mostly to feature-parity with editor (#3472)
The only missing piece is the context menu, which I'll work on next.

Release Notes:

- N/A
2023-12-01 14:44:56 +01:00
Antonio Scandurra f0c205be5d Respond to modifiers changed event in editor2 and set cursor 2023-12-01 14:26:49 +01:00
Antonio Scandurra f0bc4a04bd Uncomment git gutter painting 2023-12-01 13:45:14 +01:00
Antonio Scandurra 1abc876c15 Merge remote-tracking branch 'origin/main' into no-more-todos-in-editor
# Conflicts:
#	crates/editor2/src/items.rs
2023-12-01 12:40:48 +01:00
Antonio Scandurra 8e4f2fb25a Remove all todos in Editor's Item implementation 2023-12-01 12:32:30 +01:00
Antonio Scandurra faa896343b Register NewFile and NewFileInDirection from Editor 2023-12-01 12:11:54 +01:00
Antonio Scandurra a8a5785ec5 Re-enable opening excerpts in Editor 2023-12-01 12:03:21 +01:00
Antonio Scandurra c9be637b6b Re-introduce auto-height in editor2 (#3471)
Release Notes:

- N/A
2023-12-01 12:02:45 +01:00
Antonio Scandurra 0b7e324d86 🔥 2023-12-01 11:53:47 +01:00
Antonio Scandurra 8c59a2d2c0 Delete commented out code for editor element 2023-12-01 11:52:40 +01:00
Antonio Scandurra 21d3ae603d Remove stray dbg statements 2023-12-01 11:49:25 +01:00
Antonio Scandurra 1b07fd6a70 Fix edits not being reported when rewrapping 2023-12-01 11:48:21 +01:00
Joseph T. Lyons eef6c3729e Fix bug preventing spaces from being used in filename (#3454)
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)).
2023-11-30 21:44:48 -05:00
Joseph T. Lyons 9849a0a6d8 Move project panel's dispatch_context() to render() 2023-11-30 21:37:41 -05:00
Marshall Bowers 6d62e6c562 Respect label_color for Buttons (#3469)
This PR makes `Button`s respect the `label_color` that is specified,
provided they are not disabled or selected.

Release Notes:

- N/A
2023-11-30 20:36:59 -05:00
Conrad Irwin 0441b4805a Show cursor position in status bar (#3464)
Passes the compiler so it must work!

(though it doesn't show up until we fix pane focus)

Release Notes:

- N/A
2023-11-30 16:40:42 -07:00
Max Brunsfeld 4f74d65d0c Restore some workspace functionality, enable workspace tests (#3468)
* Pane history navigation
* Autosave on focus change
* Setting the window title based on the active path
2023-11-30 15:26:44 -08:00
Max Brunsfeld cb11c1282c Re-introduce active path tracking in workspace 2023-11-30 14:58:14 -08:00
Max Brunsfeld a003a91212 Restore auto-save on focus change, re-enable workspace tests 2023-11-30 14:45:27 -08:00
Nate Butler bac39e85a8 Add some text to clarify no api key state (#3462)
This PR is a quick-and-dirty approach to clarify what is happening when
a user doesn't have an API key so the assistant opens with the key
editor.

- Adds some text explaining how to close the panel
- Explains that other subscriptions don't cover the assistant, it needs
an api key.
- Helps people understand where to go to get an API key.

This is a Zed 1 change only, a bandaid. Zed 2 will have a better
solution: [Working
issue](https://github.com/zed-industries/zed/issues/3461)

Release Notes:

- N/A
2023-11-30 17:26:50 -05:00
Marshall Bowers e5a5b1e84c Rework ListHeader to be more open (#3467)
This PR reworks the `ListHeader` component to be more open.

The `meta` method can now be used to append meta items of any element to
the `ListHeader`, and they will be rendered with the appropriate spacing
between them.

Release Notes:

- N/A
2023-11-30 15:55:31 -05:00
Max Brunsfeld c63ca09eed Reintroduce pane navigation history in zed2 2023-11-30 12:10:25 -08:00
Max Brunsfeld bd6fa66a7c Bump Tree-sitter to fix another crash triggered by a markdown file (#3466)
Bumps Tree-sitter for
https://github.com/tree-sitter/tree-sitter/pull/2802

This fixes a regression introduced in the last Tree-sitter upgrade.

Release Notes:

- Fixed a crash that occurred when editing certain Markdown files.
2023-11-30 11:46:00 -08:00
Max Brunsfeld 16dc978bb4 Bump Tree-sitter for a crash fix 2023-11-30 11:36:36 -08:00
Joseph T. LyonsandMikayla Maki f922ad9f7f Fix bug preventing spaces from being used in filename (zed2)
Co-Authored-By: Mikayla Maki <mikayla.c.maki@gmail.com>
2023-11-30 14:24:00 -05:00
Marshall Bowers 3ffcb97da2 Implement Selectable for list components (#3465)
This PR implements the `Selectable` trait for the `ListItem` and
`ListHeader` components.

These components already had their own selectable behavior, but weren't
formally adhering to the interface defined by the trait.

Release Notes:

- N/A
2023-11-30 13:37:29 -05:00
Marshall Bowers e78538e162 Implement Selectable for ListItem and ListHeader 2023-11-30 13:26:12 -05:00
Marshall Bowers 865baaa1a1 Remove unused GraphicSlot enum 2023-11-30 13:25:26 -05:00
Mikayla Maki b34b197d89 Update main.rs 2023-11-30 10:06:08 -08:00