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:
parent
82655b9285
commit
7ad0d09228
1 changed files with 5 additions and 2 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue