mirror of
https://github.com/junegunn/fzf.git
synced 2026-08-02 06:00:32 +08:00
Let inline sections take precedence over --header-first
--header-first previously was rejected with --header-border=inline or --header-lines-border=inline. Now, inline placement wins: an inline section stays inside the list frame, and --header-first only affects non-inline sections (mainly the main --header).
This commit is contained in:
+5
-1
@@ -2844,7 +2844,11 @@ func (t *Terminal) resizeWindows(forcePreview bool, redrawBorder bool) {
|
||||
|
||||
if hasInputWindow {
|
||||
var btop int
|
||||
if (hasHeaderWindow || hasHeaderLinesWindow) && t.headerFirst {
|
||||
// Inline sections live inside the list frame, so they don't participate
|
||||
// in --header-first repositioning; only non-inline sections do.
|
||||
hasNonInlineHeader := hasHeaderWindow && t.headerBorderShape != tui.BorderInline
|
||||
hasNonInlineHeaderLines := hasHeaderLinesWindow && headerLinesShape != tui.BorderInline
|
||||
if (hasNonInlineHeader || hasNonInlineHeaderLines) && t.headerFirst {
|
||||
switch t.layout {
|
||||
case layoutDefault:
|
||||
btop = w.Top() + w.Height()
|
||||
|
||||
Reference in New Issue
Block a user