From 110231f3c2774ba93e8c6a9af8e03296bf1937d7 Mon Sep 17 00:00:00 2001 From: rabite Date: Mon, 29 Jul 2019 20:01:22 +0200 Subject: fix persisting images in kitty terminal --- src/main.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.rs b/src/main.rs index a89fe4c..e4051ec 100644 --- a/src/main.rs +++ b/src/main.rs @@ -79,6 +79,12 @@ use trait_ext::PathBufMime; fn reset_screen(core: &mut WidgetCore) -> HResult<()> { + // Clean images to stop them from showing up later + let g_mode = core.config().graphics; + if g_mode == "kitty" || g_mode == "auto" { + print!("\x1b_Ga=d\x1b\\"); + } + core.screen.suspend() } -- cgit v1.2.3