Skip to content

Commit

Permalink
Merge pull request #105 from kdheepak/fix-alacritty-bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kdheepak committed Feb 15, 2021
2 parents f4030aa + 43f2355 commit 4b92e6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on:
- master
tags:
- v*
pull_request:
branches:
- master

jobs:
build:
Expand Down
4 changes: 2 additions & 2 deletions src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ impl Events {

pub fn pause_key_capture(&self, terminal: &mut Terminal<CrosstermBackend<io::Stdout>>) {
self.pause_event_loop();
thread::sleep(Duration::from_millis(250));
terminal.flush().unwrap();
disable_raw_mode().unwrap();
execute!(io::stdout(), LeaveAlternateScreen, DisableMouseCapture).unwrap();
terminal.show_cursor().unwrap();
Expand All @@ -153,7 +153,7 @@ impl Events {
pub fn resume_key_capture(&self, terminal: &mut Terminal<CrosstermBackend<io::Stdout>>) {
execute!(io::stdout(), EnterAlternateScreen, EnableMouseCapture).unwrap();
enable_raw_mode().unwrap();
thread::sleep(Duration::from_millis(250));
terminal.flush().unwrap();
self.resume_event_loop();
terminal.resize(terminal.size().unwrap()).unwrap();
}
Expand Down

0 comments on commit 4b92e6e

Please sign in to comment.