mirror of
https://github.com/wez/wezterm.git
synced 2024-09-11 14:25:57 +03:00
wezterm: fix probecaps borrowing issue
due to a change in `termwiz`, `ProbeCapabilities` must now be dropped (manually or otherwise) before the terminal can be used after calling `probe_capabilities()`.
This commit is contained in:
parent
5a4b353a64
commit
c058178604
@ -499,7 +499,6 @@ impl ImgCatCommand {
|
||||
|
||||
let caps = Capabilities::new_from_env()?;
|
||||
let mut term = termwiz::terminal::new_terminal(caps)?;
|
||||
term.set_raw_mode()?;
|
||||
|
||||
let mut probe = term
|
||||
.probe_capabilities()
|
||||
@ -511,6 +510,8 @@ impl ImgCatCommand {
|
||||
|
||||
let is_tmux = xt_version.is_tmux();
|
||||
|
||||
drop(probe);
|
||||
|
||||
// TODO: ideally we'd do some kind of probing to see if conpty
|
||||
// is in the mix. For now we just assume that if we are on windows
|
||||
// then it must be in there somewhere.
|
||||
@ -525,8 +526,6 @@ impl ImgCatCommand {
|
||||
// We can only use forced movement if we know the pixel geometry
|
||||
&& (term_size.xpixel != 0 && term_size.ypixel != 0);
|
||||
|
||||
term.set_cooked_mode()?;
|
||||
|
||||
let save_cursor = Esc::Code(EscCode::DecSaveCursorPosition);
|
||||
let restore_cursor = Esc::Code(EscCode::DecRestoreCursorPosition);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user