Skip adaptive height validation when --tmux overrides --height

Fix #4742
This commit is contained in:
Junegunn Choi
2026-03-26 20:55:51 +09:00
parent 1acf980e95
commit 12be5e7b83

View File

@@ -3593,7 +3593,7 @@ func validateOptions(opts *Options) error {
}
}
if opts.Height.auto {
if opts.Height.auto && (opts.Tmux == nil || opts.Tmux.index < opts.Height.index) {
for _, s := range []sizeSpec{opts.Margin[0], opts.Margin[2]} {
if s.percent {
return errors.New("adaptive height is not compatible with top/bottom percent margin")