Go to file
Michael Grant 9a3aa26a33 screen-write: clip negative floating-pane offsets before reporting damage
screen_write_redraw_cb() passed wp->xoff/wp->yoff straight through as
u_int to redraw_damage_window(). Both are genuinely signed and can be
negative for a floating pane positioned partly off the window's left
or top edge (layout_floating_args_parse() explicitly allows -X/-Y
down to -sx/-sy). A negative value wraps to a huge u_int,
redraw_damage_window()'s first bounds check (x >= w->sx) rejects the
whole rectangle, and nothing gets redrawn - not even the pane's
visible portion.

This is broader than just the alternate-screen-exit case that first
surfaced it: screen_write_pane_is_obscured() routes any scrolling
output in such a pane through this same callback, so a partly
off-screen floating pane lost every scroll repaint, not just its
post-alternate-screen one.

Fixed at the call site (matching the existing correct reference
pattern in window_pane_damage_floating(), window.c): compute in signed
int, clip negative offsets to the window's own origin and shrink the
corresponding size to match, then convert to u_int only once the
rectangle is known to be sane. Left redraw_damage_window()'s own
signature alone - it has a second caller with an inclusive-bounds
convention that a signature change would need to reconcile, and the
bug is specific to this call site not clamping before converting.

regress/floating-pane-offscreen-alternate-redraw.sh creates a floating
pane with -X -5 (partly off the left edge), cycles it through the
alternate screen, and checks an attached client's own received bytes
(not capture-pane, which reads the grid directly and would pass
regardless of whether the client was ever told to redraw) show the
primary screen's content correctly restored in the pane's visible
columns. Verified failing 3/3 against the pre-fix code and passing
5/5 against the fix.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 09:53:32 +01:00
2026-09-21 22:34:05 +01:00
2026-06-26 11:28:15 +01:00
2026-03-01 17:01:08 +00:00
2020-05-19 12:34:34 +01:00
2026-09-11 09:05:06 +01:00
2026-09-09 13:28:07 +01:00
2026-03-25 10:38:03 +00:00
2026-07-13 10:29:28 +01:00

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
tmux source code
Readme 152 MiB
Languages
C 73.1%
Shell 19.1%
Roff 5.7%
Yacc 0.9%
M4 0.7%
Other 0.4%