@ 261102.1

260906.2 · 1372d04f79bde0daa3bab4b96a068baafa808e67

Fix adaptive height with an inline header or footer border

- extraLines() used borderLines(), which reports zero for BorderInline
- Divider drawn for an inline section still takes a line, and
resizeWindows() reserves it via addInline()
- So adaptive height came up one line short per inline section and the
list scrolled
- Affects --header-lines-border, --header-border and --footer-border
alike. All three set came up three lines short
- Without a list border the shape normalizes to BorderTop or BorderBottom,
which report a line, hence --no-list-border looked like a fix

seq 10 | fzf --height=~100% --list-border \
--header-lines=1 --header-lines-border=inline

Fix #4904

reading declarations

Changes to test/test_layout.rb. All files

test/test_layout.rb

@@ -882,6 +882,28 @@ class TestLayout < TestInteractive     tmux.until { assert_block(block, it) }   end +  def test_adaptive_height_with_inline_sections+    tmux.send_keys %(seq 10 | #{FZF} --height=~100% --list-border --header-lines=1 --header-lines-border=inline), :Enter+    block = <<~BLOCK+      ╭──────+      │   10+      │   9+      │   8+      │   7+      │   6+      │   5+      │   4+      │   3+      │ > 2+      ├──────+      │   1+      ╰──────+          9/9+        >+    BLOCK+    tmux.until { assert_block(block, it) }+  end+   def test_style_full_adaptive_height     tmux.send_keys %(seq 1| #{FZF} --style=full:rounded --height=~100% --header-lines=1 --info=default), :Enter     block = <<~BLOCK