Check threshold alternatives for preview at 'next' position

Alternative layout in --preview-window spec can also place preview next
to input section, e.g. 'up,40%,<30(next)'
This commit is contained in:
Junegunn Choi
2026-07-17 23:47:50 +09:00
parent e098a796bb
commit f7f8b35f6c
+7 -5
View File
@@ -1717,11 +1717,13 @@ func (t *Terminal) separatedByBorder() bool {
if t.inputBorderShape.Visible() {
return true
}
if t.previewOpts.position == posNext {
// A preview window at 'next' position sits right next to the input
// section instead. Keep the separator, as the visibility and the
// border of the preview window can change at runtime.
return false
for po := &t.previewOpts; po != nil; po = po.alternative {
if po.position == posNext {
// A preview window at 'next' position sits right next to the input
// section instead. Keep the separator, as the visibility and the
// border of the preview window can change at runtime.
return false
}
}
hasHeaderLinesWindow, headerLinesShape := t.determineHeaderLinesShape()
hasHeaderWindow := t.hasHeaderWindow()