diff --git a/src/terminal.go b/src/terminal.go
index e1d14adc..7d826fa3 100644
--- a/src/terminal.go
+++ b/src/terminal.go
@@ -2647,6 +2647,9 @@ func (t *Terminal) headerIndent(borderShape tui.BorderShape) int {
 	}
 	if borderShape.HasLeft() {
 		indentSize -= 1 + t.borderWidth
+		if indentSize < 0 {
+			indentSize = 0
+		}
 	}
 	return indentSize
 }
diff --git a/test/test_layout.rb b/test/test_layout.rb
index 401f0f35..ed384712 100644
--- a/test/test_layout.rb
+++ b/test/test_layout.rb
@@ -991,4 +991,16 @@ class TestLayout < TestInteractive
     BLOCK
     tmux.until { assert_block(block, it) }
   end
+
+  def test_header_border_no_pointer_and_marker
+    tmux.send_keys %(seq 10 | #{FZF} --header-lines 1 --header-border sharp --no-list-border --pointer '' --marker ''), :Enter
+    block = <<~BLOCK
+      ┌──────
+      │ 1
+      └──────
+        9/9 ─
+      >
+    BLOCK
+    tmux.until { assert_block(block, it) }
+  end
 end