-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
fix termcode yank/paste #12142
Closed
Closed
fix termcode yank/paste #12142
Conversation
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
Ah actually I see the problem. #10839 introduced an error enum with a |
the-mikedavis
added a commit
that referenced
this pull request
Dec 2, 2024
This fixes reading from the clipboard when using the termcode provider. Reading isn't implemented for the termcode provider so `get_contents` returns `ClipboardError::ReadingNotSupported`. `read_from_clipboard` needs to recognize this case and use the saved values instead of emitting an error log and returning nothing. Follow-up of #10839 Also see #12142
I pushed a change to cover that case - could you rebuild master and give the termcode provider another try? |
Yup - that fixed it. Thanks! |
GladkihEgor
pushed a commit
to GladkihEgor/helix
that referenced
this pull request
Jan 4, 2025
This fixes reading from the clipboard when using the termcode provider. Reading isn't implemented for the termcode provider so `get_contents` returns `ClipboardError::ReadingNotSupported`. `read_from_clipboard` needs to recognize this case and use the saved values instead of emitting an error log and returning nothing. Follow-up of helix-editor#10839 Also see helix-editor#12142
diucicd
pushed a commit
to diucicd/helix
that referenced
this pull request
Jan 8, 2025
This fixes reading from the clipboard when using the termcode provider. Reading isn't implemented for the termcode provider so `get_contents` returns `ClipboardError::ReadingNotSupported`. `read_from_clipboard` needs to recognize this case and use the saved values instead of emitting an error log and returning nothing. Follow-up of helix-editor#10839 Also see helix-editor#12142
rmburg
pushed a commit
to rmburg/helix
that referenced
this pull request
Jan 20, 2025
This fixes reading from the clipboard when using the termcode provider. Reading isn't implemented for the termcode provider so `get_contents` returns `ClipboardError::ReadingNotSupported`. `read_from_clipboard` needs to recognize this case and use the saved values instead of emitting an error log and returning nothing. Follow-up of helix-editor#10839 Also see helix-editor#12142
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#10839 broke the termcode clipboard implementation.
Previously termcode relied on the stateful
FallbackProvider
implementation of theClipboardProvider
trait to capture buffer data for yank/paste. Now thatFallbackProvider
is gone andClipboardProvider
is a stateless enum, yank/paste fails to function.This PR re-introduces some of the
FallbackProvider
machinery in a newTermcodeProvider
structure within theClipboardProvider::Termcode
enum. This allows yank/paste to work again. Because the overarching context in which clipboard providers now run is from aDynAccess
type direct mutation is not possible, so I've put the mutable bits in a mutex (required instead of a RefCell as this code path is called from a threaded context).