mirror of
https://github.com/helix-editor/termina.git
synced 2025-10-06 00:22:43 +02:00
examples: Call Terminal::reset_mode instead of relying on Drop
At some point recently I got rid of the Drop stuff. We need to reset the mode or else Windows powershell crashes for me when trying to claim CONIN$ twice. (Run an example before this commit and then run regular `hx`).
This commit is contained in:
@@ -70,8 +70,7 @@ fn main() -> io::Result<()> {
|
||||
other => eprintln!("unexpected event: {other:?}\r"),
|
||||
}
|
||||
}
|
||||
terminal.enter_cooked_mode()?;
|
||||
drop(terminal);
|
||||
terminal.reset_mode()?;
|
||||
println!("Detected features: {features:?}");
|
||||
|
||||
Ok(())
|
||||
|
@@ -131,6 +131,8 @@ fn main() -> io::Result<()> {
|
||||
))),
|
||||
)?;
|
||||
|
||||
terminal.reset_mode()?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user