mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 17:34:47 -05:00
chore: fix pty_tab_handler test on windows (#14927)
This commit is contained in:
parent
82655b9285
commit
7ad0d09228
1 changed files with 5 additions and 2 deletions
|
@ -371,7 +371,7 @@ impl ReplEditor {
|
||||||
EventHandler::Simple(Cmd::Newline),
|
EventHandler::Simple(Cmd::Newline),
|
||||||
);
|
);
|
||||||
editor.bind_sequence(
|
editor.bind_sequence(
|
||||||
KeyEvent::from('\t'),
|
KeyEvent(KeyCode::Tab, Modifiers::NONE),
|
||||||
EventHandler::Conditional(Box::new(TabEventHandler)),
|
EventHandler::Conditional(Box::new(TabEventHandler)),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -411,7 +411,10 @@ impl ConditionalEventHandler for TabEventHandler {
|
||||||
_: bool,
|
_: bool,
|
||||||
ctx: &EventContext,
|
ctx: &EventContext,
|
||||||
) -> Option<Cmd> {
|
) -> 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()
|
if ctx.line().is_empty()
|
||||||
|| ctx.line()[..ctx.pos()]
|
|| ctx.line()[..ctx.pos()]
|
||||||
.chars()
|
.chars()
|
||||||
|
|
Loading…
Add table
Reference in a new issue