Skip to content

Commit

Permalink
tiny fix: merge execute into one
Browse files Browse the repository at this point in the history
  • Loading branch information
ynqa committed Apr 10, 2024
1 parent 1f4acab commit e3116c8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions promkit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,13 @@ pub struct Prompt<T> {

impl<T> Drop for Prompt<T> {
fn drop(&mut self) {
execute!(io::stdout(), cursor::MoveToNextLine(1)).ok();
execute!(io::stdout(), cursor::Show).ok();
execute!(io::stdout(), event::DisableMouseCapture).ok();
execute!(
io::stdout(),
cursor::Show,
event::DisableMouseCapture,
cursor::MoveToNextLine(1),
)
.ok();
disable_raw_mode().ok();
}
}
Expand Down

0 comments on commit e3116c8

Please sign in to comment.