Add ctrl-k and ctrl-j for up and down (#394)
This commit is contained in:
parent
25afb5b2ed
commit
e9d2ec4bf7
1 changed files with 2 additions and 2 deletions
|
@ -343,7 +343,7 @@ async fn key_handler(
|
||||||
|
|
||||||
query_results(app, search_mode, db).await.unwrap();
|
query_results(app, search_mode, db).await.unwrap();
|
||||||
}
|
}
|
||||||
Key::Down | Key::Ctrl('n') => {
|
Key::Down | Key::Ctrl('n' | 'j') => {
|
||||||
let i = match app.results_state.selected() {
|
let i = match app.results_state.selected() {
|
||||||
Some(i) => {
|
Some(i) => {
|
||||||
if i == 0 {
|
if i == 0 {
|
||||||
|
@ -356,7 +356,7 @@ async fn key_handler(
|
||||||
};
|
};
|
||||||
app.results_state.select(Some(i));
|
app.results_state.select(Some(i));
|
||||||
}
|
}
|
||||||
Key::Up | Key::Ctrl('p') => {
|
Key::Up | Key::Ctrl('p' | 'k') => {
|
||||||
let i = match app.results_state.selected() {
|
let i = match app.results_state.selected() {
|
||||||
Some(i) => {
|
Some(i) => {
|
||||||
if i >= app.results.len() - 1 {
|
if i >= app.results.len() - 1 {
|
||||||
|
|
Loading…
Reference in a new issue