mirror of
https://github.com/gitui-org/gitui
synced 2026-05-23 08:58:21 +00:00
hide cursor again after external editor closes (fixes #168)
This commit is contained in:
parent
313f5586b0
commit
756c124b68
1 changed files with 9 additions and 2 deletions
11
src/main.rs
11
src/main.rs
|
|
@ -39,7 +39,7 @@ use crossterm::{
|
|||
},
|
||||
ExecutableCommand,
|
||||
};
|
||||
use input::{Input, InputEvent};
|
||||
use input::{Input, InputEvent, InputState};
|
||||
use profiler::Profiler;
|
||||
use scopeguard::defer;
|
||||
use scopetime::scope_time;
|
||||
|
|
@ -129,7 +129,14 @@ fn main() -> Result<()> {
|
|||
scope_time!("loop");
|
||||
|
||||
match event {
|
||||
QueueEvent::InputEvent(ev) => app.event(ev)?,
|
||||
QueueEvent::InputEvent(ev) => {
|
||||
if let InputEvent::State(InputState::Polling) = ev
|
||||
{
|
||||
//Note: external ed closed, we need to re-hide cursor
|
||||
terminal.hide_cursor()?;
|
||||
}
|
||||
app.event(ev)?
|
||||
}
|
||||
QueueEvent::Tick => app.update()?,
|
||||
QueueEvent::GitEvent(ev) => app.update_git(ev)?,
|
||||
QueueEvent::SpinnerUpdate => unreachable!(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue