mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-15 06:43:47 -05:00
Fix --layout reverse-list --no-input
This commit is contained in:
@@ -2184,9 +2184,12 @@ func (t *Terminal) move(y int, x int, clear bool) {
|
|||||||
case layoutDefault:
|
case layoutDefault:
|
||||||
y = h - y - 1
|
y = h - y - 1
|
||||||
case layoutReverseList:
|
case layoutReverseList:
|
||||||
n := 2 + t.visibleHeaderLinesInList()
|
n := t.visibleHeaderLinesInList()
|
||||||
if t.noSeparatorLine() {
|
if !t.inputless {
|
||||||
n--
|
n++
|
||||||
|
}
|
||||||
|
if !t.noSeparatorLine() {
|
||||||
|
n++
|
||||||
}
|
}
|
||||||
if y < n {
|
if y < n {
|
||||||
y = h - y - 1
|
y = h - y - 1
|
||||||
|
|||||||
@@ -891,4 +891,19 @@ class TestLayout < TestInteractive
|
|||||||
BLOCK
|
BLOCK
|
||||||
tmux.until { assert_block(block, _1) }
|
tmux.until { assert_block(block, _1) }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_min_height_auto_no_input_reverse_list
|
||||||
|
tmux.send_keys %(seq 100 | #{FZF} --style full:sharp --layout reverse-list --no-input --height 1% --min-height 5+), :Enter
|
||||||
|
|
||||||
|
block = <<~BLOCK
|
||||||
|
┌─────────
|
||||||
|
│ > 1
|
||||||
|
│ 2
|
||||||
|
│ 3
|
||||||
|
│ 4
|
||||||
|
│ 5
|
||||||
|
└─────────
|
||||||
|
BLOCK
|
||||||
|
tmux.until { assert_block(block, _1) }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user