Commit Graph
22 Commits
Author SHA1 Message Date
Lukas WirthandJohn Tur f3f6d62664 GPUI on the web (#50228)
Implements a basic web platform for the wasm32-unknown-unknown target
for gpui

Release Notes:

- N/A *or* Added/Fixed/Improved ...

---------

Co-authored-by: John Tur <john-tur@outlook.com>
2026-02-26 18:36:50 +01:00
Paul Sadauskas 160f62ad76 Update Editor::select_larger_syntax_node (#36971)
When the cursor was sitting on a syntactically insignificant character,
like a `{` or `,`, this function was selecting only that character, when
what the user likely wanted was to select the next larger syntax node.

Those punctuation characters all seemed to be not "named", in
tree-sitter terminology, so I updated the function to walk up the node
tree until it found a node where `is_named()` is true.

Closes #4555 

Also, while writing the tests, the output of a failing test with the
wrong thing selected was harder to read than it needed to be.

It used to output a diff of ranges, like this:

<img width="217" height="111" alt="image"
src="https://github.com/user-attachments/assets/00de53a8-8776-47aa-8101-5a5b5bc3fa5e"
/>

I leveraged the existing `generate_marked_text` helper function and
updated the assertion to output a diff of the text with the selection
markers:

<img width="211" height="116" alt="image"
src="https://github.com/user-attachments/assets/53b2b882-2676-4c70-8718-e2e2ba6f254e"
/>

Happy to make that a separate PR, if needed.

Release Notes:

- Fixed Editor select_larger_syntax_node to be smart about punctuation.
2025-09-09 12:13:20 -06:00
Michael Sloan bba16335b3 Add #[track_caller] to test utilities that involve marked text (#32043)
Release Notes:

- N/A
2025-06-04 02:37:27 +00:00
Marshall Bowers 0c3b391ba8 Fix Clippy warnings in util crate (#8721)
This PR fixes a number of Clippy warnings in the `util` crate.

Release Notes:

- N/A
2024-03-02 13:06:35 -05:00
Kirill Bulatov f47435b84d Use collections::{HashMap, HashSet} instead of its std:: counterpart (#7502) 2024-02-07 19:06:03 +02:00
Antonio Scandurra 15f378650b Revert "Use Fx* variants of HashMap and HashSet everywhere in Zed" (#7492)
Reverts zed-industries/zed#7481

This would regress performance because we'd be using the standard
library's hash maps everywhere, so reverting for now.
2024-02-07 13:16:22 +01:00
Kirill Bulatov 5111ec0773 Use Fx* variants of HashMap and HashSet everywhere in Zed (#7481)
Release Notes:

- N/A
2024-02-07 09:45:37 +02:00
Nathan Sobo 8c4db131da Fix remaining vim failures 2023-04-20 15:25:11 -06:00
Petros Amoiridis 2fbfd629ba Fix doctests 2023-03-30 17:57:14 +03:00
ForLoveOfCatsandMikayla fbea44bc5c One big cleanup pass of clippy lints
Co-authored-by: Mikayla <mikayla@zed.dev>
2022-08-10 16:51:01 -07:00
Max Brunsfeld bd8a81def1 Add docs to marked range functions 2022-08-04 11:14:21 -07:00
Max Brunsfeld 8aef95d0c8 Use new marked ranges format whenever we don't need overlapping ranges 2022-08-04 10:23:03 -07:00
Max Brunsfeld 8a8a3e0a2a Update marked text helpers to use more distinctive characters for markers 2022-08-03 16:45:16 -07:00
Keith Simmons efb4547793 add show_completions_on_input setting to disable popping the completions menu automatically 2022-07-13 14:23:49 -07:00
Keith Simmons cc567846e3 fix error with reverse range marked text ranges 2022-07-05 16:44:45 -07:00
Keith Simmons dcc3f6731f highlight both brackets, only when empty selection, and add test 2022-07-05 15:19:05 -07:00
Keith Simmons d5178a27f9 fix bug in marked_range utils 2022-05-26 17:02:05 -07:00
Keith Simmons 205ab8f03a Order returned ranges from marked_text_ranges by start index 2022-05-11 10:18:40 -07:00
Keith Simmons 5e768dbf57 Add test coverage for same cursor in multiple excerpts of the same buffer 2022-05-10 14:30:27 -07:00
Keith Simmons b4402fa377 Fix up assertion errors in set_eq and visual tests 2022-05-10 11:12:34 -07:00
Keith Simmons cdbad9aee4 Initial visual mode 2022-05-10 11:12:28 -07:00
Keith SimmonsandMax Brunsfeld f11b269016 Add assert_set_eq macro to make test clearer
Co-authored-by: Max Brunsfeld <max@zed.dev>
2022-03-30 13:53:38 -07:00