fix: set cursor block after closing input prompt from insert mode

This commit is contained in:
auvred 2023-09-05 09:03:10 +00:00
parent a2ecc9fb70
commit 0f6569a3f3
No known key found for this signature in database

View file

@ -3,7 +3,7 @@ use std::ops::Range;
use anyhow::{anyhow, Result};
use config::keymap::Key;
use crossterm::event::KeyCode;
use shared::CharKind;
use shared::{CharKind, Term};
use tokio::sync::oneshot::Sender;
use unicode_width::UnicodeWidthStr;
@ -43,6 +43,7 @@ impl Input {
cb.send(if submit { Ok(self.snap_mut().value.clone()) } else { Err(anyhow!("canceled")) });
}
let _ = Term::set_cursor_block();
self.visible = false;
true
}