mirror of
https://github.com/tmux/tmux.git
synced 2026-09-22 12:57:43 +00:00
4a1e445b388230e1ec8a99b630786310f1f5bd96
window_copy_scroll() (called from both scrollbar-slider-drag paths - window_copy_cmd_scroll_to_mouse() and copy-mode -S) calls window_set_active_pane() to switch focus to the dragged pane, but was the one caller in the whole codebase that did this without pairing it with window_redraw_active_switch() first, and without falling back to a full server_redraw_window() either. Every other window_set_active_ pane() caller does one or the other. This used to be harmless because window_set_active_pane() itself did an unconditional full redraw on every active-pane change - narrowing that to borders/status-only for the non-zoomed case (this branch) made pane *body* colours only repaint when something sets PANE_REDRAW, which is exactly what window_redraw_active_switch() does by comparing cached window-style/window-active-style colours. Without it, dragging an inactive pane's scrollbar slider changes which pane is active (borders and status update immediately) while both panes keep their stale body colours until an unrelated redraw happens to touch them. Fix: call window_redraw_active_switch() immediately before window_set_ active_pane(), matching the established pattern (e.g. cmd-resize-pane.c's mouse-drag handler). regress/window-copy-scrollbar-drag-focus-style.sh sets clearly distinguishable window-active-style/window-style backgrounds, drags the *inactive* pane's scrollbar slider, and checks - via an attached client's own received bytes, since window-style is applied during redraw composition rather than stored in the grid, so capture-pane alone would not reflect it - that the newly active pane immediately shows the active-style colour. Verified failing 3/3 against the pre-fix code (showing both panes with swapped/stale colours, exactly as reported) and passing 5/5 against the fix. 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.1%
Shell
19.1%
Roff
5.7%
Yacc
0.9%
M4
0.7%
Other
0.4%