Keep separator when preview window is at 'next' position

Preview window at 'next' position sits right next to input section, so
border of header or list section is not adjacent to it. Suppressing
separator there left no divider when preview border is none.
This commit is contained in:
Junegunn Choi
2026-07-17 23:26:48 +09:00
parent 5e31fd25e7
commit a62fc80f1a
+6
View File
@@ -1717,6 +1717,12 @@ 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
}
hasHeaderLinesWindow, headerLinesShape := t.determineHeaderLinesShape()
hasHeaderWindow := t.hasHeaderWindow()
if !hasHeaderWindow && !hasHeaderLinesWindow {