mirror of
https://github.com/notohh/rustlings.git
synced 2024-11-21 21:42:23 -05:00
Remove the modifier filter in the list mode
This commit is contained in:
parent
9b0eeb815a
commit
279ebdc153
1 changed files with 5 additions and 11 deletions
12
src/list.rs
12
src/list.rs
|
@ -1,6 +1,6 @@
|
|||
use anyhow::Result;
|
||||
use crossterm::{
|
||||
event::{self, Event, KeyCode, KeyEventKind, KeyModifiers},
|
||||
event::{self, Event, KeyCode, KeyEventKind},
|
||||
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
|
||||
ExecutableCommand,
|
||||
};
|
||||
|
@ -28,16 +28,10 @@ pub fn list(app_state: &mut AppState) -> Result<()> {
|
|||
|
||||
let key = loop {
|
||||
match event::read()? {
|
||||
Event::Key(key) => {
|
||||
if key.modifiers != KeyModifiers::NONE {
|
||||
continue;
|
||||
}
|
||||
|
||||
match key.kind {
|
||||
Event::Key(key) => match key.kind {
|
||||
KeyEventKind::Press | KeyEventKind::Repeat => break key,
|
||||
KeyEventKind::Release => (),
|
||||
}
|
||||
}
|
||||
},
|
||||
// Redraw
|
||||
Event::Resize(_, _) => continue 'outer,
|
||||
// Ignore
|
||||
|
|
Loading…
Reference in a new issue