Skip to content

Commit 385fc44

Browse files
committed
:wremch: Fixed typo
1 parent 8ceb5c7 commit 385fc44

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/read.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ pub mod windows {
112112
disable_line_buffering().unwrap();
113113
if std::io::stdin().read(&mut buffer).is_ok() {
114114
enable_line_buffering().unwrap();
115-
match buffer[0] {
115+
match buffer {
116116
[13, 0, 0] => Some(Key::Enter),
117117
[9, 0, 0] => Some(Key::Tab),
118118
[8, 0, 0] => Some(Key::Backspace),
@@ -121,7 +121,7 @@ pub mod windows {
121121
[0, 0, 80] => Some(Key::ArrowDown),
122122
[0, 0, 77] => Some(Key::ArrowRight),
123123
[0, 0, 75] => Some(Key::ArrowLeft),
124-
c => Some(Key::Char(c as char)),
124+
[c, _, _] => Some(Key::Char(c as char)),
125125
}
126126
} else {
127127
None

0 commit comments

Comments
 (0)