From a62fc80f1a6471c36b540ede1c92bdabf141f683 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Fri, 17 Jul 2026 23:26:48 +0900 Subject: [PATCH] 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. --- src/terminal.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/terminal.go b/src/terminal.go index 9cc1fdac..bb1a8ff4 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -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 {