mirror of
https://github.com/junegunn/fzf
synced 2026-07-17 16:03:17 +00:00
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:
+7
-5
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user