summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAzad <49314270+Akmadan23@users.noreply.github.com>2024-05-20 00:31:30 +0200
committerGitHub <noreply@github.com>2024-05-19 18:31:30 -0400
commit5e582e0a8751009797debabb55a3162b829da1c2 (patch)
tree5a6d89f75755dc92dd762172fa015ff2c99cef5d
parentd9496689e29d9aaa1d55ec9ca822d36ef895381d (diff)
fix: hide image preview in fzf and task view (#525)
* fix: hide image preview in fzf and task view * Fix errors * Style
-rw-r--r--src/commands/fzf.rs4
-rw-r--r--src/commands/show_tasks.rs2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/commands/fzf.rs b/src/commands/fzf.rs
index bc4667a..73b081e 100644
--- a/src/commands/fzf.rs
+++ b/src/commands/fzf.rs
@@ -3,6 +3,7 @@ use std::process::{Command, Stdio};
use std::str::from_utf8;
use crate::config::clean::app::search::CaseSensitivity;
+use crate::context::remove_external_preview;
use crate::context::AppContext;
use crate::error::{AppError, AppResult};
use crate::ui::AppBackend;
@@ -51,11 +52,12 @@ pub fn fzf_multi(
}
fn fzf_impl(
- _context: &mut AppContext,
+ context: &mut AppContext,
backend: &mut AppBackend,
items: Vec<String>,
args: Vec<String>,
) -> AppResult<String> {
+ remove_external_preview(context);
backend.terminal_drop();
let mut cmd = Command::new("fzf");
diff --git a/src/commands/show_tasks.rs b/src/commands/show_tasks.rs
index 3b21ae8..919dde7 100644
--- a/src/commands/show_tasks.rs
+++ b/src/commands/show_tasks.rs
@@ -1,4 +1,5 @@
use crate::config::clean::keymap::AppKeyMapping;
+use crate::context::remove_external_preview;
use crate::context::AppContext;
use crate::error::AppResult;
use crate::event::process_event;
@@ -14,6 +15,7 @@ pub fn show_tasks(
keymap_t: &AppKeyMapping,
) -> AppResult {
context.flush_event();
+ remove_external_preview(context);
let mut exit = false;