mirror of
https://github.com/tmux/tmux.git
synced 2026-10-15 16:04:34 +00:00
Keep retained indexed SIXEL data and the bounded per-terminal output cache. Use the cleaned-up decoder and RGBA encoder from image_merge, including parser memory limits, pixel-size handling and references for pending output. Match retained SIXEL scaling to the shared image cell footprint and emit black definitions for undefined colour registers. Keep Kitty input, output, layers and placeholders. Adapt backend selection, flags, drawing and cleanup to the callbacks and Iscrl capability. Keep the pane-status repaint with the requested XXX comment. Replace the elaborate fallback with image_merge's implementation, removing its caches, sample structures, quadrant/sextant features and ACS additions. Keep the image_merge regressions and adapt the Kitty tests to the simpler fallback. Use skip status 101 and disable Python bytecode for image tests. Small changes still outside image_merge: - Guard zero-height synchronized redraws before bit_nset. - Select the image backend when the tty opens. - Enable imagescroll by default for Kitty and Ghostty. - Keep the explanatory manual-window pixel-size comment (comment only). - Keep the additional SIXEL fixtures and visual test tools. Validation: image-enabled and disabled builds; 31 image and 13 related regressions pass normally and under ASAN. All image tests skip without images. Focused palette, parser, scaling, transparency and Kitty layer tests also pass after the retained-output adjustments. Diff checks clean.
59 lines
1.8 KiB
Bash
59 lines
1.8 KiB
Bash
#!/bin/sh
|
|
|
|
# A SIXEL pane redraw must erase only cells owned by that pane, preserving
|
|
# content in an overlapping floating pane when leaving copy mode.
|
|
|
|
. ./image-common.inc
|
|
|
|
PATH=/bin:/usr/bin
|
|
TERM=screen
|
|
LC_ALL=C.UTF-8
|
|
export TERM LC_ALL
|
|
|
|
[ -z "$TEST_TMUX" ] && TEST_TMUX=$(readlink -f ../tmux)
|
|
TMUX="$TEST_TMUX -Lifcw$$ -f/dev/null"
|
|
TMUX2="$TEST_TMUX -Lifcw-inner$$ -f/dev/null"
|
|
$TMUX kill-server 2>/dev/null
|
|
$TMUX2 kill-server 2>/dev/null
|
|
|
|
TMP=$(mktemp)
|
|
trap "$TMUX kill-server 2>/dev/null; $TMUX2 kill-server 2>/dev/null; rm -f $TMP" 0 1 15
|
|
|
|
$TMUX2 new-session -d -x 60 -y 20 "sh -c 'i=0; while [ \$i -lt 30 ]; do printf \"TILE%02d\\n\" \$i; i=\$((i + 1)); done; exec sleep 100'" \
|
|
|| exit 1
|
|
$TMUX2 new-pane -x20 -y6 -X8 -Y3 -T FLOATTITLE "sh -c 'printf FLOATCONTENT; exec sleep 100'" \
|
|
|| exit 1
|
|
image_check_support $TMUX2
|
|
|
|
# The attaching client must be detected as SIXEL-capable - this bug does
|
|
# not reproduce on a fallback or Kitty client.
|
|
$TMUX2 set -as terminal-features ',*:sixel' || exit 1
|
|
|
|
$TMUX new-session -d -x 60 -y 20 || exit 1
|
|
$TMUX send-keys -l "$TMUX2 attach-session" || exit 1
|
|
$TMUX send-keys Enter || exit 1
|
|
sleep 1
|
|
|
|
# Sanity check: the floating pane's content is visible before anything
|
|
# disturbs it.
|
|
$TMUX capturep -p >$TMP || exit 1
|
|
grep -q 'FLOATCONTENT' $TMP || exit 1
|
|
|
|
# Click the tiled pane (making it active), enter copy-mode scrolled up
|
|
# (matching a PageUp binding), move up one line (matching an Up binding),
|
|
# then exit copy-mode - the exit is what triggers window_pane_reset_mode(),
|
|
# which is what actually caused the erase.
|
|
$TMUX2 select-pane -t%0 || exit 1
|
|
sleep 1
|
|
$TMUX2 copy-mode -u -t%0 || exit 1
|
|
sleep 1
|
|
$TMUX2 send-keys -t%0 -X cursor-up || exit 1
|
|
sleep 1
|
|
$TMUX2 send-keys -t%0 -X cancel || exit 1
|
|
sleep 1
|
|
|
|
$TMUX capturep -p >$TMP || exit 1
|
|
grep -q 'FLOATCONTENT' $TMP || exit 1
|
|
|
|
exit 0
|