Skip to content

Commit

Permalink
fix: hide image preview in fzf and task view (#525)
Browse files Browse the repository at this point in the history
* fix: hide image preview in fzf and task view

* Fix errors

* Style
  • Loading branch information
Akmadan23 authored May 19, 2024
1 parent d949668 commit 5e582e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/commands/fzf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
Expand Down
2 changes: 2 additions & 0 deletions src/commands/show_tasks.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -14,6 +15,7 @@ pub fn show_tasks(
keymap_t: &AppKeyMapping,
) -> AppResult {
context.flush_event();
remove_external_preview(context);

let mut exit = false;

Expand Down

0 comments on commit 5e582e0

Please sign in to comment.