summaryrefslogtreecommitdiff
path: root/cli/tools/repl/editor.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2022-06-21 15:24:50 -0400
committerGitHub <noreply@github.com>2022-06-21 15:24:50 -0400
commit7ad0d092281c040c5c5be4ba0415f3e7551201de (patch)
treeefa446820e1faaf8e3d01b84c629266573c57055 /cli/tools/repl/editor.rs
parent82655b928500ca7a9762617b1c61f80fd122ccbd (diff)
chore: fix pty_tab_handler test on windows (#14927)
Diffstat (limited to 'cli/tools/repl/editor.rs')
-rw-r--r--cli/tools/repl/editor.rs7
1 files changed, 5 insertions, 2 deletions
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<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()