Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux: Make prompt detail selectable #21405

Merged

Conversation

0xtimsb
Copy link
Member

@0xtimsb 0xtimsb commented Dec 2, 2024

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:

before after

When detail is None or empty string:

none

Release Notes:

  • N/A

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Dec 2, 2024
@mikayla-maki mikayla-maki self-assigned this Dec 3, 2024
@0xtimsb
Copy link
Member Author

0xtimsb commented Dec 4, 2024

@mikayla-maki Thank you! Updated it with Markdown. Above GIFs too.

@mikayla-maki
Copy link
Member

Can you rebase on main? #21497 is causing your CI to fail :)

@0xtimsb 0xtimsb force-pushed the selectable-detail-for-linux branch from 7c81ffe to 30d0899 Compare December 5, 2024 03:52
@0xtimsb 0xtimsb requested a review from mikayla-maki December 5, 2024 15:19
@mikayla-maki
Copy link
Member

Thank you!

@mikayla-maki mikayla-maki merged commit bffdc55 into zed-industries:main Dec 6, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Linux] Cannot copy "About Zed" information
2 participants