mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-15 23:03:47 -05:00
Fix adaptive height with --header-border
This commit is contained in:
@@ -1093,6 +1093,9 @@ func (t *Terminal) extraLines() int {
|
|||||||
if t.listBorderShape.Visible() {
|
if t.listBorderShape.Visible() {
|
||||||
extra += borderLines(t.listBorderShape)
|
extra += borderLines(t.listBorderShape)
|
||||||
}
|
}
|
||||||
|
if t.headerBorderShape.Visible() {
|
||||||
|
extra += borderLines(t.headerBorderShape)
|
||||||
|
}
|
||||||
if !t.noSeparatorLine() {
|
if !t.noSeparatorLine() {
|
||||||
extra++
|
extra++
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3702,6 +3702,22 @@ class TestGoFZF < TestBase
|
|||||||
BLOCK
|
BLOCK
|
||||||
tmux.until { assert_block(block, _1) }
|
tmux.until { assert_block(block, _1) }
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
module TestShell
|
module TestShell
|
||||||
|
|||||||
Reference in New Issue
Block a user