mirror of
https://github.com/tmux/tmux.git
synced 2026-06-23 08:27:08 +00:00
Correctly clip left of panes.
This commit is contained in:
@@ -58,6 +58,11 @@ tile_2x2() {
|
||||
$TMUX2 select-layout tiled || exit 1
|
||||
}
|
||||
|
||||
# fill_base_pattern: make clipped floating panes visibly cover every column.
|
||||
fill_base_pattern() {
|
||||
$TMUX2 respawnp -k "sh -c 'i=0; while [ \$i -lt 12 ]; do printf \"%02d:abcdefghijklmnopqrstuvwxyz0123456789\n\" \$i; i=\$((i + 1)); done; exec sleep 100'" || exit 1
|
||||
}
|
||||
|
||||
$TMUX kill-server 2>/dev/null
|
||||
$TMUX2 kill-server 2>/dev/null
|
||||
|
||||
@@ -118,6 +123,28 @@ new_scene 40 12
|
||||
$TMUX2 new-pane -x18 -y6 -X-4 -Y-2 "sh -c 'printf TL; exec sleep 100'" || exit 1
|
||||
compare floating-clip-topleft
|
||||
|
||||
# Floating panes clipped at each edge. The patterned base pane makes sure the
|
||||
# clipped edge still obscures both content and borders underneath.
|
||||
new_scene 40 12
|
||||
fill_base_pattern
|
||||
$TMUX2 new-pane -x20 -y6 -X-10 -Y3 "sh -c 'printf LEFT; exec sleep 100'" || exit 1
|
||||
compare floating-clip-left
|
||||
|
||||
new_scene 40 12
|
||||
fill_base_pattern
|
||||
$TMUX2 new-pane -x20 -y6 -X30 -Y3 "sh -c 'printf RIGHT; exec sleep 100'" || exit 1
|
||||
compare floating-clip-right
|
||||
|
||||
new_scene 40 12
|
||||
fill_base_pattern
|
||||
$TMUX2 new-pane -x20 -y6 -X10 -Y-3 "sh -c 'printf TOP; exec sleep 100'" || exit 1
|
||||
compare floating-clip-top
|
||||
|
||||
new_scene 40 12
|
||||
fill_base_pattern
|
||||
$TMUX2 new-pane -x20 -y6 -X10 -Y9 "sh -c 'printf BOTTOM; exec sleep 100'" || exit 1
|
||||
compare floating-clip-bottom
|
||||
|
||||
# Floating pane over a tiled 2x2 grid: the float draws a complete box and must
|
||||
# NOT merge its borders with the tiled pane borders underneath.
|
||||
new_scene 40 12
|
||||
|
||||
12
regress/screen-redraw-results/floating-clip-bottom.result
Normal file
12
regress/screen-redraw-results/floating-clip-bottom.result
Normal file
@@ -0,0 +1,12 @@
|
||||
01:abcdefghijklmnopqrstuvwxyz0123456789
|
||||
02:abcdefghijklmnopqrstuvwxyz0123456789
|
||||
03:abcdefghijklmnopqrstuvwxyz0123456789
|
||||
04:abcdefghijklmnopqrstuvwxyz0123456789
|
||||
05:abcdefghijklmnopqrstuvwxyz0123456789
|
||||
06:abcdefghijklmnopqrstuvwxyz0123456789
|
||||
07:abcdefghijklmnopqrstuvwxyz0123456789
|
||||
08:abcdefghijklmnopqrstuvwxyz0123456789
|
||||
09:abcdef┌────────────────────┐23456789
|
||||
10:abcdef│BOTTOM │23456789
|
||||
11:abcdef│ │23456789
|
||||
│ │
|
||||
12
regress/screen-redraw-results/floating-clip-left.result
Normal file
12
regress/screen-redraw-results/floating-clip-left.result
Normal file
@@ -0,0 +1,12 @@
|
||||
01:abcdefghijklmnopqrstuvwxyz0123456789
|
||||
02:abcdefghijklmnopqrstuvwxyz0123456789
|
||||
──────────┐ijklmnopqrstuvwxyz0123456789
|
||||
│ijklmnopqrstuvwxyz0123456789
|
||||
│ijklmnopqrstuvwxyz0123456789
|
||||
│ijklmnopqrstuvwxyz0123456789
|
||||
│ijklmnopqrstuvwxyz0123456789
|
||||
│ijklmnopqrstuvwxyz0123456789
|
||||
│ijklmnopqrstuvwxyz0123456789
|
||||
──────────┘ijklmnopqrstuvwxyz0123456789
|
||||
11:abcdefghijklmnopqrstuvwxyz0123456789
|
||||
|
||||
12
regress/screen-redraw-results/floating-clip-right.result
Normal file
12
regress/screen-redraw-results/floating-clip-right.result
Normal file
@@ -0,0 +1,12 @@
|
||||
01:abcdefghijklmnopqrstuvwxyz0123456789
|
||||
02:abcdefghijklmnopqrstuvwxyz0123456789
|
||||
03:abcdefghijklmnopqrstuvwxyz┌──────────
|
||||
04:abcdefghijklmnopqrstuvwxyz│RIGHT
|
||||
05:abcdefghijklmnopqrstuvwxyz│
|
||||
06:abcdefghijklmnopqrstuvwxyz│
|
||||
07:abcdefghijklmnopqrstuvwxyz│
|
||||
08:abcdefghijklmnopqrstuvwxyz│
|
||||
09:abcdefghijklmnopqrstuvwxyz│
|
||||
10:abcdefghijklmnopqrstuvwxyz└──────────
|
||||
11:abcdefghijklmnopqrstuvwxyz0123456789
|
||||
|
||||
12
regress/screen-redraw-results/floating-clip-top.result
Normal file
12
regress/screen-redraw-results/floating-clip-top.result
Normal file
@@ -0,0 +1,12 @@
|
||||
01:abcdef│ │23456789
|
||||
02:abcdef│ │23456789
|
||||
03:abcdef│ │23456789
|
||||
04:abcdef└────────────────────┘23456789
|
||||
05:abcdefghijklmnopqrstuvwxyz0123456789
|
||||
06:abcdefghijklmnopqrstuvwxyz0123456789
|
||||
07:abcdefghijklmnopqrstuvwxyz0123456789
|
||||
08:abcdefghijklmnopqrstuvwxyz0123456789
|
||||
09:abcdefghijklmnopqrstuvwxyz0123456789
|
||||
10:abcdefghijklmnopqrstuvwxyz0123456789
|
||||
11:abcdefghijklmnopqrstuvwxyz0123456789
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
base
|
||||
│
|
||||
│
|
||||
│
|
||||
─────────────┘
|
||||
│
|
||||
──────────────┘
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user