From 7ad0d092281c040c5c5be4ba0415f3e7551201de Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 21 Jun 2022 15:24:50 -0400 Subject: chore: fix pty_tab_handler test on windows (#14927) --- cli/tools/repl/editor.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'cli/tools/repl') diff --git a/cli/tools/repl/editor.rs b/cli/tools/repl/editor.rs index cc095a603..e518a8735 100644 --- a/cli/tools/repl/editor.rs +++ b/cli/tools/repl/editor.rs @@ -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 { - 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() -- cgit v1.2.3