mirror of
https://github.com/tmux/tmux.git
synced 2026-08-28 17:41:35 +00:00
48e33179d4f39896489d925e49d2fd0c2dcc594a
Fixes the four bugs caught by the regression tests added in aed1209c
(popup-drag-status-line.sh, popup-drag-wide-character.sh,
popup-drag-pane-prompt.sh, switch-client-redraw.sh), based on fixes
from Michael K. Darling (github.com/darlingm/tmux, pr5516-regression-
fixes), reviewed and adapted:
- server-client.c: server_client_set_session()'s check for whether the
client's window actually changed compared old->curw to s->curw, but
when old == s these read the same, already-updated field, so a
same-session window switch was never detected. Compare against the
client's own cached redraw scene instead (redraw_client_has_window(),
new in screen-redraw.c/tmux.h). Taken from darlingm as-is.
- popup.c: popup_damage() only translated a popup's client-coordinate
rectangle into window coordinates, so a popup dragged across the
status line never triggered a status-line redraw once it moved away -
status_redraw()'s own "skip if content unchanged" optimization
suppressed it, since only the popup moved, not the status content.
Now detects overlap with the status line and forces a redraw via the
existing (previously unused) CLIENT_REDRAWSTATUSALWAYS flag, and
properly clips the reported rectangle to the pane area for
status-at-top/bottom/off. Taken from darlingm as-is.
- screen-redraw.c: redraw_draw_damage_rect() clipped a span to a damage
rectangle's raw geometric edges, which have no idea what's in the
grid, so a clip edge could land mid-character and tear a wide
character in half. Added redraw_damage_grow_span_clip(): widen the
clip by one cell on each edge that isn't already at the span's own
boundary. Reimplemented simpler than darlingm's version (which walked
grid cells per span type via a switch and direct grid lookups) -
since no grid cell is ever wider than two columns, an unconditional
one-cell margin is always enough to pull a split character back in,
with no need to inspect grid content at all.
- screen-redraw.c: redraw_draw_damage_rect() also never re-overlaid a
pane's active in-pane prompt after drawing its underlying content, so
damage crossing a prompt row erased it until an unrelated redraw
restored it. Factored the existing full-redraw prompt-building code
into a shared redraw_make_pane_prompt() helper and added
redraw_damage_draw_pane_prompt(), which recomposes the prompt over
the drawn range. Taken from darlingm as-is.
All 9 regression tests in regress/ now pass. redraw_damage_grow_span_clip
was verified independently by disabling it and confirming
popup-drag-wide-character.sh reproduces its original failure.
Co-Authored-By: Michael K. Darling <darlingm@gmail.com>
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
75.8%
Shell
16.1%
Roff
5.9%
Yacc
1%
M4
0.7%
Other
0.4%