-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
linux: Make prompt detail selectable (#21405)
Closes #21305 As Linux doesn’t have native prompts, Zed uses a custom GPU-based prompt, like the "About Zed" prompt. Currently, the detail in the prompt isn’t selectable. This PR fixes that by using the editor's multi-line selectable functionality to make the detail selectable (and thus copyable). It achieves this by disabling editing and setting the cursor to transparent. The editor also does all the heavy lifting, like double-clicking to select a word or triple-clicking to select a line, like what user expects from selectable. Before/After: <img src="https://github.com/user-attachments/assets/2012a6cc-a1ed-4efe-8bfb-440a9259f07a" alt="before" width="360px" /> <img src="https://github.com/user-attachments/assets/31922ef5-cb2d-4e90-a1a1-00843e767432" alt="after" width="360px" /> When detail is `None` or empty string: <img src="https://github.com/user-attachments/assets/2be5c921-bda1-4db3-85cd-b4b0e2df86d2" alt="none" width="360px" /> Release Notes: - N/A
- Loading branch information
1 parent
9ca0d99
commit bffdc55
Showing
3 changed files
with
32 additions
and
13 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters