From b26ee32f861ba560e69585debbc194065fea8d00 Mon Sep 17 00:00:00 2001 From: Akmadan23 Date: Mon, 8 Apr 2024 14:18:45 +0200 Subject: [PATCH] Fix errors --- src/commands/fzf.rs | 5 +++-- src/commands/show_tasks.rs | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/commands/fzf.rs b/src/commands/fzf.rs index 175dc7d89..41a7d27c0 100644 --- a/src/commands/fzf.rs +++ b/src/commands/fzf.rs @@ -4,6 +4,7 @@ use std::str::from_utf8; use crate::config::clean::app::search::CaseSensitivity; use crate::context::AppContext; +use crate::context::remove_external_preview; use crate::error::{AppError, AppResult}; use crate::ui::AppBackend; @@ -51,13 +52,13 @@ pub fn fzf_multi( } fn fzf_impl( - _context: &mut AppContext, + context: &mut AppContext, backend: &mut AppBackend, items: Vec, args: Vec, ) -> AppResult { + remove_external_preview(context); backend.terminal_drop(); - context.remove_external_preview(); let mut cmd = Command::new("fzf"); cmd.stdout(Stdio::piped()).args(&args); diff --git a/src/commands/show_tasks.rs b/src/commands/show_tasks.rs index 60ccc6817..b9f892028 100644 --- a/src/commands/show_tasks.rs +++ b/src/commands/show_tasks.rs @@ -1,5 +1,6 @@ use crate::config::clean::keymap::AppKeyMapping; use crate::context::AppContext; +use crate::context::remove_external_preview; use crate::error::AppResult; use crate::event::process_event; use crate::event::AppEvent; @@ -14,7 +15,7 @@ pub fn show_tasks( keymap_t: &AppKeyMapping, ) -> AppResult { context.flush_event(); - context.remove_external_preview(); + remove_external_preview(context); let mut exit = false;