mirror of
https://github.com/tmux/tmux.git
synced 2026-09-22 21:07:48 +00:00
d4adce7e004bf5855aad7f68dbf89eb913ddc96c
redraw_damage_draw_pane_prompt() recomposes a pane's separately rendered prompt (wp->prompt) over a damaged sub-range of a REDRAW_SPAN_PANE span, reusing the (x, n) range that redraw_client_damage() already clipped and grew against the pane's own *content* grid (wp->screen) via redraw_damage_grow_span_clip(). That growing exists specifically to avoid splitting a wide character at the range's edge - but the prompt is drawn into its own, freshly allocated one-line screen with no relationship to the content grid, so a range that's clean (or correctly grown) for the content can still land mid-character in the prompt's own grid. This is invisible whenever the pane's content is plain ASCII: the content grid has no padding cells to find, so redraw_damage_grow_span_clip() never grows the range at all, and the raw geometric range - however it landed - is passed straight through to the prompt. If that range's end lands right after a base cell whose padding half falls just outside it, tty_draw_line() has no room left for that cell's second column (tty_draw_line_get_empty()'s gc->data.width > nx check) and blanks it entirely, even though the pane's own content never needed the fix at all. Reproduced with a floating pane's CJK prompt straddling the boundary between two tiled panes underneath it: a palette change (OSC 4) in one of the tiled panes triggers a redraw of its own rectangle, which is occluded by the floating pane but still geometrically overlaps its prompt row, recomposing a partial range of the prompt that cuts through a character. Fix: extract the grid-probing tail of redraw_span_cell_is_padding() into redraw_screen_cell_is_padding(), usable against any screen, and add redraw_damage_grow_screen_clip() - the same left/right one-step growth as redraw_damage_grow_span_clip(), but against an explicit screen and column origin. redraw_damage_draw_pane_prompt() now re-derives its own (x0, x1) range from the caller's (x, n) by growing it against the prompt's own screen before drawing, clamped to the span so it can't bleed into a neighbouring one. New regress/floating-pane-prompt-wide-character.sh constructs the exact tiled-pane-boundary scenario above and checks the CJK prompt text is intact after the trigger. Verified failing 3/3 against the pre-fix code (a character is blanked) and passing 5/5 standalone plus 2/2 in the full regress suite (twice, since this touches the same damage-composition path as every other redraw) against the fix, with no other tests newly broken (prompt-words-history.sh and the untracked image-support scratch tests are pre-existing, unrelated failures). 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%