Skip to content

Commit

Permalink
Fix adaptive height with --header-border
Browse files Browse the repository at this point in the history
  • Loading branch information
junegunn committed Jan 7, 2025
1 parent a30181e commit 9c2f6ca
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/terminal.go
Original file line number Diff line number Diff line change
Expand Up @@ -1093,6 +1093,9 @@ func (t *Terminal) extraLines() int {
if t.listBorderShape.Visible() {
extra += borderLines(t.listBorderShape)
}
if t.headerBorderShape.Visible() {
extra += borderLines(t.headerBorderShape)
}
if !t.noSeparatorLine() {
extra++
}
Expand Down
16 changes: 16 additions & 0 deletions test/test_go.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3702,6 +3702,22 @@ def test_all_borders_header_first
BLOCK
tmux.until { assert_block(block, _1) }
end

def test_style_full_adaptive_height
tmux.send_keys %(seq 1| #{FZF} --style=full --height=~100% --header-lines=1 --info=default), :Enter
block = <<~BLOCK
╭────────
╰────────
╭────────
│ 1
╰────────
╭────────
│ 0/0
│ >
╰────────
BLOCK
tmux.until { assert_block(block, _1) }
end
end

module TestShell
Expand Down

0 comments on commit 9c2f6ca

Please sign in to comment.