Go to file
Michael Grant 729c361aad screen-redraw: stop floating-pane drags from clobbering unrelated panes
window_pane_redraw_floating() (called by every floating-pane drag/resize
command) had two conflicting redraw paths: a precise damage-rectangle
path for the dragged pane, and an unconditional server_redraw_window()
added to fix border-status recomposition (aa6b52ef) that silently
defeated it, redrawing every pane - including retransmitting unrelated
images - on every drag tick.

Chasing the border-status bug back further: it was actually caused by
an upstream regression (824a0729) that split CLIENT_REDRAWWINDOW's
redraw flags into REDRAW_ALL vs. REDRAW_ALL & ~REDRAW_OVERLAY, silently
breaking every literal `flags == REDRAW_ALL` check downstream
(REDRAW_IS_ALL()), including the one that decides whether a pane's
border-status title should be forced to recompose even when its text
hasn't logically changed. Fix this properly instead of reaching for
server_redraw_window() again: decouple overlay-drawing from the shared
flags value (it's only ever read in the one place that repaints an
overlay) so redraw_screen() can pass a genuinely literal REDRAW_ALL for
a window redraw. This also fixes a second-client-attach bug where a new
client's pane titles never appeared until their text changed, since the
per-pane title cache is shared across clients.

Also fixed a real, independent bug in server-client.c found along the
way: `~c->flags & CLIENT_ALLREDRAWFLAGS` is a 6-bit mask, so `~x & MASK`
tests "any bit unset" (almost always true) rather than "no bits set" as
intended - causing damage to be composed and transmitted twice on every
floating-drag tick.

With server_redraw_window() gone, a second problem surfaced: deferred
client redraws (common under a busy tty) still escalated any pending
window damage to a full CLIENT_REDRAWWINDOW redraw, because
server_client_loop() frees w->damage unconditionally every pass with no
tracking of whether a deferred client actually got to consume it. Fix
this by giving each client a copy of missed damage (c->pending_damage,
reusing the existing merge/collapse/16-entry-cap logic damage lists
already have) keyed by the window's id, so a client can compose it
precisely on a later pass instead of resending everything. Window ids
are monotonic and never reused, so a stale id is enough to detect and
discard damage left over from a window the client has since switched
away from or that has been destroyed.

Verified with regress/image-border-status-wipe.sh,
regress/floating-pane-drag-scrollbar-strip.sh,
regress/image-movepane-drag-noflash.sh, and
regress/image-splitwindow-resize-noflash.sh (5 runs each), the full
regress suite (twice), an ASAN/UBSAN debug build, and manual repros for
a window switch and a window destroy mid-defer.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-21 05:00:13 +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-03-25 10:38:03 +00:00
2026-08-25 11:23:52 +01:00
2026-08-05 09:10:54 +00:00
2026-07-13 10:29:28 +01:00
2026-07-13 20:30:47 +01:00
2026-08-25 11:53:39 +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 147 MiB
Languages
C 73.2%
Shell 19.1%
Roff 5.6%
Yacc 0.9%
M4 0.7%
Other 0.4%