first attempt to get crossterm 25 working in reedline#464
first attempt to get crossterm 25 working in reedline#464fdncred wants to merge 7 commits intonushell:mainfrom
Conversation
|
There's a couple things that I need help with/understanding @sholderbach or others.
execute!(
stdout,
EnableBracketedPaste,
EnableFocusChange,
EnableMouseCapture,
PushKeyboardEnhancementFlags(
KeyboardEnhancementFlags::DISAMBIGUATE_ESCAPE_CODES
| KeyboardEnhancementFlags::REPORT_ALL_KEYS_AS_ESCAPE_CODES
| KeyboardEnhancementFlags::REPORT_EVENT_TYPES
)
)?;
Event::Paste(s) => ReedlineEvent::Paste(s),and ReedlineEvent::Paste(_) => Ok(EventStatus::Handled), // TODO: Handle PasteOther than those 2 areas, I'm not sure what else this PR needs. Any thoughts? One thing I just thought of, some of this may need to be behind a feature or conditional compilation because I don't think it's supported on Windows yet. |
|
Ah, that's something we should get over the finish line for this release as well. |
Agreed. I'm just not sure what to do about those two points. I think the rest of the PR is pretty much ready. There wasn't a lot to it. There will probably be some things to change on the nushell side so that the |
|
Someone in Discord was just asking about control backspace not working. It works with this PR. We just need to somehow address the 2 points above. |
|
|
|
an issue in nushell about this nushell/nushell#6622 - there are probably more than this one. |
|
I can offer some comments on the bracketed-paste issue. Bracketed-paste - Wikipedia mentions auto-indent. I don't think this is implemented anyway so shouldn't be an issue. However what is an issue is where pasting many lines runs the first command: In Zsh this doesn't happen under bracketed paste. The user is free to edit both lines. |
|
@stevenxxiu Feel free to dive in here. We definitely want to move forward with crossterm. I think we're a couple versions behind now. It would be good for someone to "fix" this PR so we can land it. |
|
Superseded by #560 |
This is the first attempt.
These seem to be working:
This PR adds support for Crossterm 0.25.0. These are the new events supported. Some features are part of supporting the kitty protocol as documented here.
KeyBindings also now support a
KeyEventKindandKeyEventState. This is what they look like.There are also more
KeyCodes that are supported now.As well as new
Modifiersand
ModifierKeyCodesAnd also
MediaKeyCodes