Merge pull request #27 from ClementTsang/fix_broken_shift
Fix for issue in powershell.
This commit is contained in:
commit
138e9c2132
14
src/main.rs
14
src/main.rs
|
@ -325,7 +325,7 @@ fn handle_key_event_or_break(
|
||||||
KeyCode::Down => app.on_down_key(),
|
KeyCode::Down => app.on_down_key(),
|
||||||
KeyCode::Left => app.on_left_key(),
|
KeyCode::Left => app.on_left_key(),
|
||||||
KeyCode::Right => app.on_right_key(),
|
KeyCode::Right => app.on_right_key(),
|
||||||
KeyCode::Char(character) => app.on_char_key(character),
|
KeyCode::Char(caught_char) => app.on_char_key(caught_char),
|
||||||
KeyCode::Esc => app.on_esc(),
|
KeyCode::Esc => app.on_esc(),
|
||||||
KeyCode::Enter => app.on_enter(),
|
KeyCode::Enter => app.on_enter(),
|
||||||
KeyCode::Tab => app.on_tab(),
|
KeyCode::Tab => app.on_tab(),
|
||||||
|
@ -361,33 +361,29 @@ fn handle_key_event_or_break(
|
||||||
} else if let KeyModifiers::SHIFT = event.modifiers {
|
} else if let KeyModifiers::SHIFT = event.modifiers {
|
||||||
match event.code {
|
match event.code {
|
||||||
KeyCode::Left => app.move_widget_selection_left(),
|
KeyCode::Left => app.move_widget_selection_left(),
|
||||||
KeyCode::Char('h') | KeyCode::Char('H') => app.on_char_key('H'),
|
|
||||||
KeyCode::Right => app.move_widget_selection_right(),
|
KeyCode::Right => app.move_widget_selection_right(),
|
||||||
KeyCode::Char('l') | KeyCode::Char('L') => app.on_char_key('L'),
|
|
||||||
KeyCode::Up => app.move_widget_selection_up(),
|
KeyCode::Up => app.move_widget_selection_up(),
|
||||||
KeyCode::Char('k') | KeyCode::Char('K') => app.on_char_key('K'),
|
|
||||||
KeyCode::Down => app.move_widget_selection_down(),
|
KeyCode::Down => app.move_widget_selection_down(),
|
||||||
KeyCode::Char('j') | KeyCode::Char('J') => app.on_char_key('J'),
|
KeyCode::Char(caught_char) => app.on_char_key(caught_char),
|
||||||
KeyCode::Char('/') | KeyCode::Char('?') => app.on_char_key('?'),
|
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
} else if let KeyModifiers::ALT = event.modifiers {
|
} else if let KeyModifiers::ALT = event.modifiers {
|
||||||
match event.code {
|
match event.code {
|
||||||
KeyCode::Char('c') => {
|
KeyCode::Char('c') | KeyCode::Char('C') => {
|
||||||
if app.is_in_search_widget() {
|
if app.is_in_search_widget() {
|
||||||
app.process_search_state.toggle_ignore_case();
|
app.process_search_state.toggle_ignore_case();
|
||||||
app.update_regex();
|
app.update_regex();
|
||||||
app.update_process_gui = true;
|
app.update_process_gui = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
KeyCode::Char('w') => {
|
KeyCode::Char('w') | KeyCode::Char('W') => {
|
||||||
if app.is_in_search_widget() {
|
if app.is_in_search_widget() {
|
||||||
app.process_search_state.toggle_search_whole_word();
|
app.process_search_state.toggle_search_whole_word();
|
||||||
app.update_regex();
|
app.update_regex();
|
||||||
app.update_process_gui = true;
|
app.update_process_gui = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
KeyCode::Char('r') => {
|
KeyCode::Char('r') | KeyCode::Char('R') => {
|
||||||
if app.is_in_search_widget() {
|
if app.is_in_search_widget() {
|
||||||
app.process_search_state.toggle_search_regex();
|
app.process_search_state.toggle_search_regex();
|
||||||
app.update_regex();
|
app.update_regex();
|
||||||
|
|
Loading…
Reference in New Issue