mirror of
https://github.com/kdheepak/taskwarrior-tui.git
synced 2025-08-24 14:36:42 +02:00
Fix completion crash
This commit is contained in:
parent
241ec96db6
commit
7e1581095a
2 changed files with 4 additions and 4 deletions
|
@ -2697,10 +2697,10 @@ impl TaskwarriorTuiApp {
|
|||
}
|
||||
|
||||
pub fn update_completion_list(&mut self) {
|
||||
self.completion_list.clear();
|
||||
match self.mode {
|
||||
AppMode::TaskModify | AppMode::TaskFilter | AppMode::TaskAnnotate | AppMode::TaskAdd | AppMode::TaskLog => {
|
||||
let virtual_tags = self.task_report_table.virtual_tags.clone();
|
||||
self.completion_list.clear();
|
||||
for task in self.tasks.iter() {
|
||||
if let Some(tags) = task.tags() {
|
||||
for tag in tags {
|
||||
|
|
|
@ -32,8 +32,8 @@ pub fn get_start_word_under_cursor(line: &str, cursor_pos: usize) -> usize {
|
|||
}
|
||||
|
||||
pub struct TaskwarriorTuiCompletionHelper {
|
||||
candidates: Vec<String>,
|
||||
completer: rustyline::completion::FilenameCompleter,
|
||||
pub candidates: Vec<String>,
|
||||
pub completer: rustyline::completion::FilenameCompleter,
|
||||
}
|
||||
|
||||
impl Completer for TaskwarriorTuiCompletionHelper {
|
||||
|
@ -167,7 +167,7 @@ impl CompletionList {
|
|||
}
|
||||
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.helper.candidates.is_empty()
|
||||
self.candidates().is_empty()
|
||||
}
|
||||
|
||||
pub fn candidates(&self) -> Vec<Pair> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue