mirror of
https://github.com/kdheepak/taskwarrior-tui.git
synced 2025-08-25 08:47:18 +02:00
Use Up and Down to navigate tab completion prompt if it is open
This commit is contained in:
parent
d915917b70
commit
e938880f77
1 changed files with 24 additions and 8 deletions
32
src/app.rs
32
src/app.rs
|
@ -2181,7 +2181,9 @@ impl TaskwarriorTuiApp {
|
|||
}
|
||||
}
|
||||
Key::Up => {
|
||||
if let Some(s) = self
|
||||
if self.show_completion_pane && !self.completion_list.items.is_empty() {
|
||||
self.completion_list.previous();
|
||||
} else if let Some(s) = self
|
||||
.command_history_context
|
||||
.history_search(&self.modify.as_str()[..self.modify.pos()], HistoryDirection::Reverse)
|
||||
{
|
||||
|
@ -2191,7 +2193,9 @@ impl TaskwarriorTuiApp {
|
|||
}
|
||||
}
|
||||
Key::Down => {
|
||||
if let Some(s) = self
|
||||
if self.show_completion_pane && !self.completion_list.items.is_empty() {
|
||||
self.completion_list.next();
|
||||
} else if let Some(s) = self
|
||||
.command_history_context
|
||||
.history_search(&self.modify.as_str()[..self.modify.pos()], HistoryDirection::Forward)
|
||||
{
|
||||
|
@ -2273,7 +2277,9 @@ impl TaskwarriorTuiApp {
|
|||
}
|
||||
}
|
||||
Key::Up => {
|
||||
if let Some(s) = self
|
||||
if self.show_completion_pane && !self.completion_list.items.is_empty() {
|
||||
self.completion_list.previous();
|
||||
} else if let Some(s) = self
|
||||
.command_history_context
|
||||
.history_search(&self.command.as_str()[..self.command.pos()], HistoryDirection::Reverse)
|
||||
{
|
||||
|
@ -2283,7 +2289,9 @@ impl TaskwarriorTuiApp {
|
|||
}
|
||||
}
|
||||
Key::Down => {
|
||||
if let Some(s) = self
|
||||
if self.show_completion_pane && !self.completion_list.items.is_empty() {
|
||||
self.completion_list.next();
|
||||
} else if let Some(s) = self
|
||||
.command_history_context
|
||||
.history_search(&self.command.as_str()[..self.command.pos()], HistoryDirection::Forward)
|
||||
{
|
||||
|
@ -2383,7 +2391,9 @@ impl TaskwarriorTuiApp {
|
|||
}
|
||||
}
|
||||
Key::Up => {
|
||||
if let Some(s) = self
|
||||
if self.show_completion_pane && !self.completion_list.items.is_empty() {
|
||||
self.completion_list.previous();
|
||||
} else if let Some(s) = self
|
||||
.command_history_context
|
||||
.history_search(&self.command.as_str()[..self.command.pos()], HistoryDirection::Reverse)
|
||||
{
|
||||
|
@ -2393,7 +2403,9 @@ impl TaskwarriorTuiApp {
|
|||
}
|
||||
}
|
||||
Key::Down => {
|
||||
if let Some(s) = self
|
||||
if self.show_completion_pane && !self.completion_list.items.is_empty() {
|
||||
self.completion_list.next();
|
||||
} else if let Some(s) = self
|
||||
.command_history_context
|
||||
.history_search(&self.command.as_str()[..self.command.pos()], HistoryDirection::Forward)
|
||||
{
|
||||
|
@ -2436,7 +2448,9 @@ impl TaskwarriorTuiApp {
|
|||
}
|
||||
}
|
||||
Key::Up => {
|
||||
if let Some(s) = self
|
||||
if self.show_completion_pane && !self.completion_list.items.is_empty() {
|
||||
self.completion_list.previous();
|
||||
} else if let Some(s) = self
|
||||
.filter_history_context
|
||||
.history_search(&self.filter.as_str()[..self.filter.pos()], HistoryDirection::Reverse)
|
||||
{
|
||||
|
@ -2447,7 +2461,9 @@ impl TaskwarriorTuiApp {
|
|||
}
|
||||
}
|
||||
Key::Down => {
|
||||
if let Some(s) = self
|
||||
if self.show_completion_pane && !self.completion_list.items.is_empty() {
|
||||
self.completion_list.previous();
|
||||
} else if let Some(s) = self
|
||||
.filter_history_context
|
||||
.history_search(&self.filter.as_str()[..self.filter.pos()], HistoryDirection::Forward)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue