mirror of
https://github.com/tmux/tmux.git
synced 2026-09-23 13:23:57 +00:00
20f76fb069a05889d0d5fe9de232492d2e281269
Any pane that doesn't span the terminal's full width - because
pane-scrollbars is on (the scrollbar occupies a column) or the pane is one
of a side-by-side split - needs DECSLRM (left/right margin) support to use
the fast native-scroll path (tty_cmd_linefeed()/scrollup()/scrolldown()/
reverseindex(), tty.c: "(!tty_full_width(tty, ctx) && !tty_use_margin(tty))").
Without it, every single scroll falls back to tty_redraw_region()'s full
manual repaint of the whole region - confirmed via -vv log
("tty_redraw_region: ... large region redraw") - which is a real source of
flicker, and separately implicated in reports of image content not
surviving a scroll in this area of the tree.
The DECSLRM machinery itself (tty_margin_pane()/tty_margin()) is already
built and already called from all four native-scroll dispatch functions.
What was missing was terminal-capability coverage:
- WezTerm and ghostty are already correctly identified via the existing
XTVERSION mechanism (tty_keys_extended_device_attributes(),
tty-keys.c), and both genuinely implement DECSLRM - confirmed directly
in their own source (WezTerm: decslrm() in csi.rs, documented in their
escape-sequences reference, a changelog entry fixing a DECSLRM bug
confirming active use; ghostty: handled in dcs.zig/stream.zig,
explicitly emitted alongside DECSTBM in their own formatter.zig, with
its own terminfo entry for it). Neither's entry in
tty_default_features()'s table (tty-features.c) granted "margins".
This was a gap, not a detection problem, backed by source-level
evidence rather than guesswork - kitty and Rio show zero DECSLRM
references in their own source, so their omission is left as-is.
- Windows Terminal's DECSLRM support was independently confirmed by
direct, non-tmux escape-sequence testing, but it can never be
identified via XTVERSION - the tracking issue for that
(github.com/microsoft/terminal#18382) was explicitly closed
not_planned by the maintainer, calling XTVERSION "not extensible or
helpful for feature detection". Detected instead via the WT_SESSION
environment variable Windows Terminal sets for every child process -
a long-standing, stable signal already used for this exact purpose by
many other tools. Checked in tty_term_create() (tty-term.c) alongside
the existing COLORTERM-based RGB/256 detection, which already reads a
named variable out of the attaching client's own environment
(c->environ, populated via the MSG_IDENTIFY_ENVIRON handshake) the
same way. Deliberately grants only "margins" for now, not the full
modern-xterm feature bundle other entries get, since no other
capability has been verified for it.
New regress/tty-margins-wt-session.sh reproduces the scrollbar-pane
scenario with WT_SESSION injected into the attaching client's environment
and checks, via the -vv log, that no tty_redraw_region() fallback occurs -
plus a sanity phase confirming the same scenario does fall back without
WT_SESSION set, proving the test isn't accidentally trivial. Verified
failing 3/3 against the pre-fix code and passing 5/5 standalone; full
regress suite passes clean twice, with only pre-existing, unrelated
failures (check-names.sh - confirmed identical on unmodified master;
prompt-words-history.sh - already-known flake; four untracked
image-*-noflash scratch tests left over from unrelated work on another
branch, not part of this tree's tracked suite).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Welcome to tmux! tmux is a terminal multiplexer: it enables a number of terminals to be created, accessed, and controlled from a single screen. tmux may be detached from a screen and continue running in the background, then later reattached. This release runs on OpenBSD, FreeBSD, NetBSD, Linux, macOS and Solaris. * Dependencies tmux depends on libevent 2.x, available from: https://github.com/libevent/libevent/releases/latest It also depends on ncurses, available from: https://invisible-mirror.net/archives/ncurses/ To build tmux, a C compiler (for example gcc or clang), make, pkg-config and a suitable yacc (yacc or bison) are needed. * Installation To build and install tmux from a release tarball, use: $ ./configure && make $ sudo make install tmux can use the utempter library to update utmp(5), if it is installed - run configure with --enable-utempter to enable this. To get and build the latest from version control - note that this requires autoconf, automake and pkg-config: $ git clone https://github.com/tmux/tmux.git $ cd tmux $ sh autogen.sh $ ./configure && make $ sudo make install * Contributing Bug reports, feature suggestions and especially code contributions are most welcome. Please send by email to: tmux-users@googlegroups.com Or open a GitHub issue or pull request. * Documentation For documentation on using tmux, see the tmux.1 manpage. View it from the source tree with: $ nroff -mdoc tmux.1|less A small example configuration is in example_tmux.conf. Other documentation is available in the wiki: https://github.com/tmux/tmux/wiki Also see the tmux FAQ at: https://github.com/tmux/tmux/wiki/FAQ A bash(1) completion file is at: https://github.com/scop/bash-completion/blob/main/completions/tmux For debugging, run tmux with -v and -vv to generate server and client log files in the current directory. * Support The tmux mailing list for general discussion and bug reports is: https://groups.google.com/forum/#!forum/tmux-users Subscribe by sending an email to: tmux-users+subscribe@googlegroups.com * License This file and the CHANGES files are licensed under the ISC license. All other files have a license and copyright notice at their start.
Description
Languages
C
73%
Shell
19.3%
Roff
5.6%
Yacc
0.9%
M4
0.7%
Other
0.4%