Hide default separator when a border separates input from list

- Applies when adjacent section (header, header lines, or list) draws
  border line facing input section

    # No separator below header border
    fzf --style full --input-border none --header foo

    # Separator shown; nothing separates input from list
    fzf --style full --input-border none --header foo --no-header-border

- Evaluated dynamically so change-header/toggle-header update it
- Inline header is drawn inside list border and not adjacent to input;
  decide from section actually next to it
- Separator is kept when a preview window can be at 'next' position,
  right next to the input section
This commit is contained in:
Junegunn Choi committed 2026-07-18 16:43:23 +09:00
1 parent e877b6f846
commit 6030226835
5 files changed
+117 -33

No files matched your search

+19 -19
View File
@@ -597,7 +597,7 @@ class TestLayout < TestInteractive
│ │ 2
│ │ 1
│ └header──
│ 19/97 ─
│ 19/97
│ > 1
│
╰────────────
@@ -628,7 +628,7 @@ class TestLayout < TestInteractive
╭────────────
│ hello
╰────────────
100/100 ─
100/100
>
BLOCK
tmux.until { assert_block(block2, it) }
@@ -648,7 +648,7 @@ class TestLayout < TestInteractive
│ 2
│ 1
╰──────────
98/98 ─
98/98
>
BLOCK
tmux.until { assert_block(block1, it) }
@@ -663,7 +663,7 @@ class TestLayout < TestInteractive
│ 1
│ hello
╰──────────
98/98 ─
98/98
>
BLOCK
tmux.until { assert_block(block2, it) }
@@ -679,7 +679,7 @@ class TestLayout < TestInteractive
│ 4
│ > 3
╰──────────
98/98 ─
98/98
>
╭──────────
│ 2
@@ -718,7 +718,7 @@ class TestLayout < TestInteractive
║ 2
║ 1
╚══════════
98/98 ─
98/98
>
BLOCK
tmux.until { assert_block(block1, it) }
@@ -734,7 +734,7 @@ class TestLayout < TestInteractive
╭──────────
│ hello
╰──────────
98/98 ─
98/98
>
BLOCK
tmux.until { assert_block(block2, it) }
@@ -750,7 +750,7 @@ class TestLayout < TestInteractive
│ 4
│ > 3
╰──────────
98/98 ─
98/98
>
╔══════════
║ 2
@@ -767,7 +767,7 @@ class TestLayout < TestInteractive
║ 2
║ 1
╚══════════
98/98 ─
98/98
>
╭──────────
│ hello
@@ -810,7 +810,7 @@ class TestLayout < TestInteractive
│ │ 2
│ │ 1
│ └header────
│ 19/97 ─
│ 19/97
│ > 1
│
╰──────────────
@@ -825,7 +825,7 @@ class TestLayout < TestInteractive
│ ║ 11
│ ║ > 10
│ ╚list══════
│ 19/97 ─
│ 19/97
│ > 1
│ ┌──────────
│ │ 3
@@ -1039,9 +1039,9 @@ class TestLayout < TestInteractive
└──────── │ 103 │ 101 │ 103 │ 101 │ │ 102 │ ┌────── │ │ 102 │ ┌────── │ 2/2 ─ │ ┌─────── │ ┌───── │ 103 │ ┌─────── │ ┌───────
│ 5/5 ─ │ 102 │ 2/2 ─ │ 102 │ │ 103 │ │ 101 │ │ 103 │ │ 101 │ > │ │ 2/2 │ │ 101 │ ┌─────── │ │ 101 │ │ >
│ > │ 103 │ > │ 103 │ └────── │ │ 102 │ └────── │ │ 102 │ ┌────── │ │ > │ │ 102 │ │ 5/5 │ │ 102 │ └───────
└──────── └──────── └──────── └──────── │ 5/5 ─ │ │ 103 │ 2/2 ─ │ │ 103 │ │ 101 │ └─────── │ │ 103 │ │ > │ │ 103 │ ┌───────
└──────── └──────── └──────── └──────── │ 5/5 │ │ 103 │ 2/2 │ │ 103 │ │ 101 │ └─────── │ │ 103 │ │ > │ │ 103 │ ┌───────
│ > │ └────── │ > │ └────── │ │ 102 │ ┌─────── │ └───── │ └─────── │ └─────── │ │ 101
└──────── └──────── └──────── │ 2/2 ─ │ │ 103 │ │ 101 └─────── └───────── │ ┌─────── │ │ 102
└──────── └──────── └──────── │ 2/2 │ │ 103 │ │ 101 └─────── └───────── │ ┌─────── │ │ 102
│ > │ └────── │ │ 102 │ │ > │ │ 103
└──────── └──────── │ │ 103 │ └─────── │ └───────
│ └─────── └───────── └─────────
@@ -1099,9 +1099,9 @@ class TestLayout < TestInteractive
│ > │ 102 │ > │ 102 │ > │ │ 101 │ > │ │ 101 │ │ 101 │ │ 101 │ └────── │ └─────── │ └────── │ 101 │ │ > 1
└──────── │ 3/3 ─ │ 101 │ 1/1 ─ │ 101 │ │ 102 │ ┌────── │ │ 102 │ │ 102 │ │ 102 │ ┌────── │ ┌─────── │ ┌────── │ 102 │ └───────
│ > │ 102 │ > │ 102 │ └─HEAD─ │ │ 101 │ └─HEAD─ │ └─HEAD─ │ └─HEAD─ │ │ 101 │ │ 1/1 │ │ 101 │ ─────── │ ┌───────
└──────── └──────── └──────── └──────── │ 3/3 ─ │ │ 102 │ 1/1 ─ │ 1/1 ─ │ 1/1 ─ │ │ 102 │ │ > │ │ 102 │ 3/3 │ │ >
└──────── └──────── └──────── └──────── │ 3/3 │ │ 102 │ 1/1 │ 1/1 │ 1/1 │ │ 102 │ │ > │ │ 102 │ 3/3 │ │ >
│ > │ └─HEAD─ │ > │ > │ > │ └─HEAD─ │ └─────── │ └─HEAD─ │ > │ └───────
└──────── └──────── └──────── └──────── └──────── │ 1/1 ─ │ ┌─────── └──────── └──────── │ ┌───────
└──────── └──────── └──────── └──────── └──────── │ 1/1 │ ┌─────── └──────── └──────── │ ┌───────
│ > │ │ 101 │ │ 101
└──────── │ │ 102 │ │ 102
│ └─HEAD── │ └─HEAD──
@@ -1159,9 +1159,9 @@ class TestLayout < TestInteractive
│ > │ 102 │ > │ 102 │ > │ │ 101 │ > │ │ 101 │ > 3 │ > 3 │ > 3 │ 101 │ │ 3
└──────── │ 3/3 ─ │ 101 │ 1/1 ─ │ 101 │ │ 102 │ ┌────── │ │ 102 │ ┌────── │ ┌─────── │ ┌────── │ 102 │ └───────
│ > │ 102 │ > │ 102 │ └─HEAD─ │ │ 101 │ └─HEAD─ │ │ 101 │ │ 1/1 │ │ 101 │ ─────── │ ┌───────
└──────── └──────── └──────── └──────── │ 3/3 ─ │ │ 102 │ 1/1 ─ │ │ 102 │ │ > │ │ 102 │ 3/3 │ │ >
└──────── └──────── └──────── └──────── │ 3/3 │ │ 102 │ 1/1 │ │ 102 │ │ > │ │ 102 │ 3/3 │ │ >
│ > │ └─HEAD─ │ > │ └─HEAD─ │ └─────── │ └─HEAD─ │ > │ └───────
└──────── └──────── └──────── │ 1/1 ─ │ ┌─────── └──────── └──────── │ ┌───────
└──────── └──────── └──────── │ 1/1 │ ┌─────── └──────── └──────── │ ┌───────
│ > │ │ 101 │ │ 101
└──────── │ │ 102 │ │ 102
│ └─HEAD── │ └─HEAD──
@@ -1191,7 +1191,7 @@ class TestLayout < TestInteractive
│ ┌─label──
│ │ header
│ └────────
│ 10/10 ─
│ 10/10
│ >
└──────────
BLOCK
@@ -1234,7 +1234,7 @@ class TestLayout < TestInteractive
┌──────
│ 1
└──────
9/9 ─
9/9
>
BLOCK
tmux.until { assert_block(block, it) }