diff --git a/src/terminal.go b/src/terminal.go index 66bef46f..8e4968ef 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -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()