Skip to content

Commit

Permalink
Fix mode restoration by making enable/disable symmetrical
Browse files Browse the repository at this point in the history
  • Loading branch information
martindisch committed Mar 21, 2024
1 parent a514310 commit 174d9c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -509,9 +509,9 @@ impl<'state, 'input> Recorder<'state, 'input> {

fn set_up_crossterm() -> Result<(), RecordError> {
if !is_raw_mode_enabled().map_err(RecordError::SetUpTerminal)? {
enable_raw_mode().map_err(RecordError::SetUpTerminal)?;
crossterm::execute!(io::stdout(), EnterAlternateScreen, EnableMouseCapture)
.map_err(RecordError::SetUpTerminal)?;
enable_raw_mode().map_err(RecordError::SetUpTerminal)?;
}
Ok(())
}
Expand Down

0 comments on commit 174d9c8

Please sign in to comment.