Track alternate screen state for panes connected to a mux domain. This
enables mouse wheel events to translate correctly to cursor movement
for alt screen applications.
closes: https://github.com/wezterm/wezterm/issues/4922
ImageDataType::Rgba8 carries the sha256 of its pixels, set wherever one
is built and refreshed wherever the pixels are mutated.
compute_hash always re-hashed the pixels to produce same stored hash.
Image hashing ran 3 times for every transmitted image:
- once in new_single_frame on image creation
- once for the cache key in raw_image_to_image_data
- once more in ImageData::with_data on the miss path
A 2400x1440 RGBA frame is 13.18MiB, so a client transmitting frames at
60fps spends most of its time budget there.
AnimRgba8 keeps hashing, because its stored hashes are per-frame, not
global, which compute_hash needs (all frames + their durations).
---------
Co-authored-by: Ido Samuelson <i-am-logger@users.noreply.github.com>
When a program turns on modifyOtherKeys and exits uncleanly, it can
leave ctrl keys emitting escape sequences the shell doesn't understand.
The obvious recovery is the "Reset the terminal emulation state in the
current pane" command in the command palette, which sends RIS. However,
RIS wasn't clearing modifyOtherKeys, so it didn't help. This commit
fixes RIS to reset that state, and a sweep for the same kind of
omission turned up missing resets for left/right margin mode and bidi
overrides, which it now resets too. This brings RIS in line with the
state a soft reset (DECSTR) already clears.
Draws a braille spinner in the tab title when a pane reports
Indeterminate progress, advancing one frame every 100ms.
This only shows when no format-tab-title event is used, and
leverages some of the infra we have for git animation scheduling.
* Add ext-background-effect-v1 support for wayland
* Deprecate `kde_window_background_blur`; use `wayland_window_background_blur`
* Update changelog (replace old kde… option entry with wayland…)
---------
Co-authored-by: Benoit de Chezelles <benoit.dechezelles@gmail.com>
assign_image_to_cells contained two unguarded divisions that could panic
with 'attempt to divide by zero' and take down the pane (and, under the mux,
the pane's reader thread):
1. A Kitty graphics escape requesting a zero-sized placement (eg: an explicit
w=0/h=0, or a source origin outside the image bounds) yields a
draw_width/draw_height of 0, used as a divisor when sizing the image.
This is the case reported in #6344.
2. Displaying a cell-sized image (one without explicit c=/r=) on a pane whose
pty reported no pixel dimensions makes cell_pixel_width/height 0, which is
then used as a divisor. A zero pixel size is the default PtySize and is what
tmux/headless domains report, so a perfectly valid image crashes there.
Guard both: refuse the placement when the drawable region or the cell pixel
size is zero.
The error flows into the existing logging handlers for the Kitty, iTerm and
Sixel paths, so no callers change.
Real GUI panes always have a non-zero pixel size, so valid images are
unaffected.
Adds regression tests for both cases (each panics on main, passes with the
fix) and enables kitty graphics in the test terminal config (off by default)
so the path is exercised.
Closes#6344
---------
Co-authored-by: Benoit de Chezelles <benoit.dechezelles@gmail.com>
The JS that removes the `$` prefix from copied text expects a `console`
code block, but the BSD instructions were using `bash` code blocks. This
switches those code blocks to `console`.
The selector used `button.md-clipboard`, but the copy button does not
have this class, causing the selector to fail to match. This switches
that class for the current copy button's class.