1175 Commits
Author SHA1 Message Date
Wez Furlong e7280b8c88 mux: Fix mouse wheel cursor movement on remote alt screens
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
2026-10-10 07:52:20 +01:00
Huy PhungandBenoit de Chezelles ae46d3a0bb fonts: Improve weight defaults: normal→dim/bold is more visible (#8097)
refs: #8049 (with examples)

---------
Co-authored-by: Benoit de Chezelles <benoit.dechezelles@gmail.com>
2026-08-29 16:16:36 +02:00
Rafael Steil 5c09609597 ui: Add command_palette_line_height config option (#8096) 2026-08-26 01:09:24 +02:00
Benoit de Chezelles f93d903500 docs: changelog for #8038 2026-08-23 23:01:48 +02:00
Benoit de Chezelles 770d8e1a75 docs: changelog for #7556, 7601, 7767, 7967, 8001, 8013 2026-08-20 09:51:06 +02:00
LoggerandIdo Samuelson 3ff7522b96 image(perf): hash each transmitted image once (#8065)
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>
2026-08-19 18:37:03 +02:00
Wez Furlong fe3006aefc term: reset more state on RIS full reset
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.
2026-08-12 07:01:21 +01:00
Jesse Portnoy b16aa977e3 docs: fix typos (#8008) 2026-08-04 16:07:57 +02:00
Benoit de Chezelles d69264df66 docs: changelog for #7385 2026-07-31 08:32:16 +02:00
Benoit de Chezelles 2ef4bef4ac wayland: Update blur surface on window resize (#7939)
ref: #7937
2026-07-16 10:25:32 +02:00
Wez Furlong 31c758f1cd tabbar: animate an indeterminate progress spinner
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.
2026-07-15 17:28:30 +01:00
Wez Furlong d96ba57121 docs: fix pages ci workflow
the ../CONTRIBUTING.md link wasn't valid because it escaped
the doc root.

Perhaps we should consolidate CONTRIBUTING.md with docs/contributing.md?
2026-07-14 22:06:16 +01:00
Benoit de Chezelles b32556667f docs: changelog for #7444 & #7928 2026-07-13 21:24:14 +02:00
1Capito1andBenoit de Chezelles 6f3d3d84f2 wayland: Support blur via ext-background-effect-v1 protocol (#7615)
* 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>
2026-07-13 18:57:32 +02:00
zakradandBenoit de Chezelles d6e1859782 fix(term): avoid divide-by-zero crashes in inline image placement (#7872)
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>
2026-06-21 22:45:33 +02:00
Benoit de Chezelles c4b1d89fd3 docs: changelog for #7787 2026-06-20 00:45:09 +02:00
Benoit de Chezelles 65c1c1f17e docs: Update changelog for recent merges 2026-06-17 23:11:51 +02:00
Benoit de Chezelles 05c5c9cc15 docs: changelog for #7137 & #7710 2026-06-06 15:53:43 +02:00
Jeff QuastandWez Furlong 577474d89e Prevent "screen scraping", disable DECRQCRA (#7701)
* Security fix: prevent screen scraping

Problem
-------

DECRQCRA was added in 6cbb3ba43, for 9702d1cf5 (esctest integration) Sunday, March 17 2019.  Six days later, March 23 2019, although esctest was removed in c93f967bc, DECRQCRA remained enabled by default for all WezTerm releases since.

March 2023, @j4james mentioned WezTerm has this option enabled by default https://github.com/microsoft/terminal/issues/14974, "some people consider it a security risk"

September 2023, https://dgl.cx/2023/09/ansi-terminal-security#cursor-checksum article writes, "using DECRQCRA [..] potential attack here is reading what is displayed on the terminal before a user SSHes to a remote system."

By switching to "alternate screen", it also possible to recover last TUI display, such as contents of the file last opened in an editor.

Example CLI script scrapes screens '0' and '1' of WezTerm, https://github.com/jquast/blessed/blob/master/bin/screen-scrape.py

Solution
--------

Disable https://vt100.net/docs/vt510-rm/DECRQCRA.html by default, may be re-enabled by configuration.

---

Refs: https://github.com/wezterm/wezterm/pull/7701

Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2026-03-31 04:00:28 -07:00
Wez Furlong 31b1beda3f docs: changelog for #7076 #7504 2026-01-17 15:37:31 +00:00
Wez Furlong 669497f80e docs: changelog for #7483 2026-01-17 15:27:40 +00:00
Wez Furlong a9a165e46c docs: changelog for #7366 2025-11-11 07:09:15 +00:00
Wez Furlong 64f2907c63 docs: changelog for https://github.com/wezterm/wezterm/pull/7283 2025-10-14 19:36:57 +01:00
Wez Furlong 4b3b5ffa16 docs for https://github.com/wezterm/wezterm/pull/7274 2025-10-14 19:36:57 +01:00
Wez Furlong b0093583e7 docs: changelog for #7277 2025-10-05 10:52:56 +01:00
Wez Furlong 411590aa1f docs: changelog for #7098 2025-07-23 08:17:29 +01:00
Wez Furlong 2b656cb5b9 docs: changelog for #7046 2025-06-22 06:47:17 +01:00
Wez Furlong f412c817c6 update harfbuzz to 11.2.1 2025-05-17 06:44:31 -07:00
Wez Furlong 909573fad9 ssh: implement ServerAliveInterval for libssh backend
This is a partial implementation of keepalives; it has the good
part (the sending of the packet on the requested interval), but
not the other part (disconnecting if we don't hear anything after
some number of packets).

The reason for not having the latter is that it isn't obvious to me how
to expose whether the channel had more incoming packets since sending
the ignore, so we cannot confidently act to terminate the connection.

refs: https://github.com/wezterm/wezterm/issues/4023
2025-05-14 07:14:22 -07:00
Wez Furlong 475e9f571f docs: changelog for #6895 2025-05-11 22:23:09 -07:00
Wez Furlong a841a72cf2 docs: changelog for #6796 2025-05-11 10:01:17 -07:00
Wez Furlong 573bc4ac06 docs: changelog for #6801 2025-05-11 09:56:35 -07:00
Wez Furlong d80060318a docs: changelog for #6850 #6845 2025-05-11 06:24:18 -07:00
Wez Furlong 4a210168e1 add new text_min_contrast_ratio option
This can help improve readability by forcing the foreground
color luminance to adjust to increase the contrast ratio to
the specified value.
2025-05-10 09:29:08 -07:00
Wez Furlong bc3dde9e75 docs: changelog for #6584 2025-05-09 10:04:05 -07:00
Wez Furlong dd3caaae34 docs: changelog for #6905 2025-05-04 06:31:33 -07:00
Wez Furlong a077a62fb9 docs: changelog for #6289 #6290 2025-05-03 06:58:10 -07:00
Wez Furlong 5a71e21a79 docs: changelog for #6928 #6929 #6823 2025-05-03 06:38:36 -07:00
Wez Furlong d4b50f6cc3 update xcb-imdkit to fix IBus IME issues
refs: https://github.com/wezterm/wezterm/issues/5125
refs: https://github.com/fcitx/xcb-imdkit/issues/16
refs: https://github.com/wezterm/xcb-imdkit-rs/pull/2
2025-05-02 06:59:51 -07:00
Wez Furlong 1439661dc9 docs: changelog for #6194 #5161
closes: #5161
2025-04-24 22:09:48 -07:00
Wez Furlong f06d6fc04f docs: changelog for #6328 #6873 #6875 2025-04-15 05:23:44 -07:00
Wez Furlong d2df5b755f docs: changelog for #6860 #6868 2025-04-13 06:54:14 -07:00
Wez Furlong 12b971ac44 docs: changelog for #6696 2025-03-09 15:37:01 -07:00
Wez Furlong 824df44296 update bundled Noto Color Emoji
This version (2.047) has unicode 16 support.

Source file is https://github.com/googlefonts/noto-emoji/blob/main/fonts/Noto-COLRv1.ttf
2025-03-09 07:00:38 -07:00
Wez Furlong 9aac7b3dec docs: changelog for #6682 2025-03-09 04:32:04 -07:00
Wez Furlong cdd70030ea docs: docs and changelog for #6558 2025-03-08 17:21:09 -07:00
Wez Furlong 7aadebfe48 termwiz: fix panic when appending long runs to clusterline
There were two different overflows that could happen here when
resizing the terminal from a narrow width to a much wider width,
when the input consists of very very long logical lines.

The first was that we could overflow the maximum number of
cells in the ClusteredLine struct, which had u16 as its type.

The second, after changing u16 to u32, was the maximum length
of a run of cells with the same attribute.

The former could be fixed, preserving the smaller integer type,
by adjusting the API to allow it to return the overflow, but
that feels awkward and we could just increase the size of
the integer type.

The latter can be caught with an overflowing_add operation
and breaking the run in the overflow case.

That is what this commit does.

+bump codec version because this causes a small change
in the serialization of line data used by the mux
protocol.

refs: https://github.com/wezterm/wezterm/issues/6729
2025-03-08 12:25:06 -07:00
Wez Furlong e8d84eeb53 docs: changelog for #6677 2025-03-08 10:24:14 -07:00
Wez Furlong 4e5341efd0 docs: changelog for #6707 2025-03-08 10:19:53 -07:00
Wez Furlong 60c3f756e4 docs: changelog for #6602 #336 2025-03-07 10:02:37 -07:00