0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-03 09:31:22 -05:00

chore: fix pty_tab_handler test on windows (#14927)

This commit is contained in:
David Sherret 2022-06-21 15:24:50 -04:00 committed by GitHub
parent 82655b9285
commit 7ad0d09228
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -371,7 +371,7 @@ impl ReplEditor {
EventHandler::Simple(Cmd::Newline),
);
editor.bind_sequence(
KeyEvent::from('\t'),
KeyEvent(KeyCode::Tab, Modifiers::NONE),
EventHandler::Conditional(Box::new(TabEventHandler)),
);
@ -411,7 +411,10 @@ impl ConditionalEventHandler for TabEventHandler {
_: bool,
ctx: &EventContext,
) -> Option<Cmd> {
debug_assert_eq!(*evt, Event::from(KeyEvent::from('\t')));
debug_assert_eq!(
*evt,
Event::from(KeyEvent(KeyCode::Tab, Modifiers::NONE))
);
if ctx.line().is_empty()
|| ctx.line()[..ctx.pos()]
.chars()