mirror of
https://github.com/junegunn/fzf.git
synced 2026-08-03 06:28:35 +08: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() {
|
if t.inputBorderShape.Visible() {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if t.previewOpts.position == posNext {
|
for po := &t.previewOpts; po != nil; po = po.alternative {
|
||||||
// A preview window at 'next' position sits right next to the input
|
if po.position == posNext {
|
||||||
// section instead. Keep the separator, as the visibility and the
|
// A preview window at 'next' position sits right next to the input
|
||||||
// border of the preview window can change at runtime.
|
// section instead. Keep the separator, as the visibility and the
|
||||||
return false
|
// border of the preview window can change at runtime.
|
||||||
|
return false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
hasHeaderLinesWindow, headerLinesShape := t.determineHeaderLinesShape()
|
hasHeaderLinesWindow, headerLinesShape := t.determineHeaderLinesShape()
|
||||||
hasHeaderWindow := t.hasHeaderWindow()
|
hasHeaderWindow := t.hasHeaderWindow()
|
||||||
|
|||||||
Reference in New Issue
Block a user