fix: set cursor block after closing input prompt from insert mode (#109)

This commit is contained in:
auvred 2023-09-06 20:04:44 +03:00 committed by GitHub
parent d3f0c9c059
commit ac58f709a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -54,4 +54,7 @@ impl Term {
#[inline] #[inline]
pub fn set_cursor_bar() -> Result<()> { Ok(execute!(stdout(), SetCursorStyle::BlinkingBar)?) } pub fn set_cursor_bar() -> Result<()> { Ok(execute!(stdout(), SetCursorStyle::BlinkingBar)?) }
#[inline]
pub fn set_cursor_default() -> Result<()> { Ok(execute!(stdout(), SetCursorStyle::DefaultUserShape)?) }
} }

View File

@ -77,6 +77,7 @@ impl Drop for Term {
execute!(stdout(), DisableFocusChange, DisableBracketedPaste, LeaveAlternateScreen)?; execute!(stdout(), DisableFocusChange, DisableBracketedPaste, LeaveAlternateScreen)?;
Self::set_cursor_default()?;
self.show_cursor()?; self.show_cursor()?;
Ok(disable_raw_mode()?) Ok(disable_raw_mode()?)
}; };