No implementation needs mutable access to report the size. The Unix
version issues TIOCGWINSZ on the fd, the Windows version calls
GetConsoleScreenBufferInfo on the handle, and the mux and ssh
implementations copy a cached value.
The &mut requirement came from the UnixTty::get_size and
ConsoleOutputHandle::get_buffer_info helpers, which are both read-only
queries, so they take &self too.
This is a breaking change for implementors of Terminal. Callers are
unaffected, since &mut T coerces to &T.
`fancy_regex` returns Err (e.g. backtracking limit exceeded)
without advancing the iterator position, causing `captures_iter`
to loop forever on the same offset. 😬👉 Break out and warn instead.
fixes: #7773
Fixes a bunch of warnings like this:
```
warning: hiding a lifetime that's elided elsewhere is confusing
--> window/src/os/macos/window.rs:670:23
|
670 | fn display_handle(&self) -> Result<DisplayHandle, HandleError> {
| ^^^^^ ------------- the same lifetime is hidden here
| |
| the lifetime is elided here
|
= help: the same lifetime is referred to in inconsistent ways, making the signature confusing
= note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
help: use `'_` for type paths
|
670 | fn display_handle(&self) -> Result<DisplayHandle<'_>, HandleError> {
| ++++
```
This lint was added in Rust 1.89: https://github.com/rust-lang/rust/issues/141787
https://github.com/wezterm/wezterm/pull/6850 changed the behavior
of spawning in such a way that if you had a default_prog and split
a pane, the default_prog you had set would not take effect.
This is because a later normalization stage would skip applying
resolving/applying the default_prog because it thought that the
command builder was already fully baked.
This commit allows that fixup logic to reason about the configured
default_prog (which may be different in a WSL context!) and fixup
the builder.
This is an alternative approach to resolving
https://github.com/wezterm/wezterm/issues/6955 for which a patch was
proprosed in https://github.com/wezterm/wezterm/pull/6972. That PR
wouldn't be quite right because the underlying logic could consider the
default_prog from a domain-specific source, rather than the global
configuration.
refs: #6769closes: #6779
The tmux output may split into multiple parts, if this spliting happens
in the middle of multiple bytes UTF8 characters, then the issue raised.
That the first part will have incomplete UTF8 character while the second
part will have a invalid UTF8 character.
In this case, we have to treat the output text as bytes rather than
UTF8 string.
This fix unvis the output text and send to pane as bytes.
On windows, if win32 input mode is active, key presses are encoded by the GUI and will bypass
the key_down logic that we use to detect when the user presses `q` to exit from `tmux -CC` mode.
This commit forces the keyboard encoding to be standard Xterm encoding for the pane
that is running `tmux -CC` mode so that we can catch the `q` press.
There have been a couple of attempts at this in the past, which
had some usability warts in what I recall as an earlier, less
useful set of features overall.
Whether that was collective misunderstanding at the time, or things
have gotten better since then, now is a good time to adopt the workspace
dep syntax, because wezterm has many crates to keep on top of, and
automation like dependabot can't see a lot of them.
This will help to manage the versions of deps in wezterm centrally.
Let's try this out in CI: the Cargo.lock changes here are minimal
(eliminated a second version of base64 from one crate, terminal_size
from another, and removed an explicit dep on serde_derive) so
hopefully this sails through on !linux.
closes: https://github.com/wezterm/wezterm/pull/6668
This commit parses and captures the progress state as set by
ConEmu style progress reporting escape sequences.
Changes to the state will propagage through the mux via the
existing MuxNotification Alert system, and should also transit
across multiplexer connections. However, there is no separate
multiplexer state transfer for the progress state, so reconnecting
to a mux in the middle of a progress sequence will show as None
for the progress state, until the next update occurs.
Aside from propgating and exposing the state to lua via PaneInformation
and a Pane::get_progress method, wezterm doesn't do anything with
the progress information at this time.
This commit includes an example of how you might customize your
tab title to reflect the progress in the active pane.
refs: https://github.com/wezterm/wezterm/issues/6581