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

fix: unreachable panic because of crossterms default-enabled brackete… #3536

Closed
wants to merge 1 commit into from

Conversation

ahkrr
Copy link

@ahkrr ahkrr commented Aug 24, 2022

…d-paste

When trying to paste using ctrl-shift-v, helix would panic!.
This is the case because in crossterm 0.25

[features]
default = ["bracketed-paste"]

is enabled, which would lead to a panic in helix-view/src/input.rs
unreachable!("crossterm shouldn't emit Paste events without them being enabled")
After setting default-features = false for crossterm 0.25, the use of crossterm::event::Event::Paste now leads to a compiler error because it is no longer included.
After removing the single use of Event::Paste, helix successfully compiles, doesn't panic, the tests pass and pasting using ctrl-shift-v also works.

…d-paste

When trying to paste using ctrl-shift-v helix would panic.
This is the case because in crossterm 0.25
[features]
default = ["bracketed-paste"]
is enabled, which would lead to a panic in helix-view/src/input.rs
  unreachable!("crossterm shouldn't emit Paste events without them being enabled")
After setting default features to false for crossterm 0.25,
the use of crossterm::event::Event::Paste now leads to a compiler error because it is no longer included.
After removing the single use of Event::Paste, helix successfully compiles, doesn't panic
and pasting using ctrl-shift-v also works.
@the-mikedavis
Copy link
Member

See also #3233 which fixes the panic by implementing bracketed paste.

This branch could be preferrable if #3233 needs any extra work though as a way to unblock the 22.08 release.

@ahkrr
Copy link
Author

ahkrr commented Aug 24, 2022

Ok. I will close this PR if the feature lands or it is no longer needed for other reasons.

@archseer
Copy link
Member

Merged #3233

@archseer archseer closed this Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants