Commit Graph
282 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 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 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 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
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 c63ca09eed Reintroduce pane navigation history in zed2 2023-11-30 12:10:25 -08:00
Conrad Irwin 75afb65b26 Show cursor position in status bar 2023-11-30 10:16:24 -07:00
Antonio Scandurra 0e1597d385 WIP 2023-11-30 18:00:41 +01:00
Antonio Scandurra d2c1897385 Fix error in tests 2023-11-30 11:45:10 +01:00
Max Brunsfeld c95a7c7387 Address some TODOs in editor2 crate (#3445)
* Fix crash when jumping to definition
* Enabling resolution of completions
* Make links in interactive text clickable
* Enable code paths that use `select_anchors`
2023-11-29 16:32:02 -08:00
Marshall Bowers b357ae4dc3 Add new Button and IconButton components (#3448)
This PR adds new `Button` and `IconButton` components built on top of
our new button abstractions.

Both of these buttons are built from the common `ButtonLike` base, and
implement the `ButtonCommon` (name TBD) trait in order to provide a
common interface.

There are still some visual tweaks that we'll need to make to the new
buttons, but those should be straightforward to make after we land this.

Release Notes:

- N/A
2023-11-29 17:41:44 -05:00
Max Brunsfeld 0b8f9067ff Implement highlighting of go-to-definition links 2023-11-29 14:30:31 -08:00
Max Brunsfeld 9451bd605d Implement completion-resolution in editor2
Enable the completion tests in editor2.
2023-11-29 14:20:47 -08:00
Max Brunsfeld 2bd428102b Use pointer cursor style for clickable ranges in InteractiveText 2023-11-29 12:42:09 -08:00
Max Brunsfeld fc2251e7ed Implement SelectionsCollection::select_anchor_ranges 2023-11-29 12:41:22 -08:00
Nate Butler 3c05d57e6a Style hover popover 2023-11-29 14:56:23 -05:00
Conrad Irwin 75891e83f3 Fix mouse events when element is occluded (#3417)
This commit adds a depth map to the frame so we can find the "top most"
opaque layer by stacking order for a given point.

This lets us determine whether the element being hovered was part of the
given layer in the previous frame, which fixes the hover issue.

Still to do:
* [ ] Fix up mouse events too (I tried this, but it's not working yet,
and I want to understand why)

Release Notes:

- N/A
2023-11-28 15:57:22 -07:00
Conrad Irwin a761e6ca0e More mouse occlusion work 2023-11-28 09:59:58 -07:00
Nate Butler ca2052b0c1 Merge branch 'main' into completions-styles 2023-11-27 19:22:07 -05:00
Conrad Irwin 107c3d7f67 Fix esc in command palette
Also: add editor.register_action
2023-11-27 14:32:22 -07:00
Conrad Irwin 82f6f77117 Use editor's overlay implementation 2023-11-27 11:49:51 -07:00
Conrad Irwin 212d9254e1 Merge branch 'main' into completions-styles 2023-11-27 11:49:39 -07:00
Conrad Irwin 7a8aba329b Break content mask for hoverables 2023-11-27 11:43:14 -07:00
Antonio Scandurra 3ea12ad0d7 Remove commented out code 2023-11-27 19:19:56 +01:00