summaryrefslogtreecommitdiff
path: root/src/terminal.go
diff options
context:
space:
mode:
authorphanium <91544758+phanen@users.noreply.github.com>2025-04-13 19:24:29 +0800
committerGitHub <noreply@github.com>2025-04-13 20:24:29 +0900
commit66df24040fed3c76df545fc34b47387c86922786 (patch)
tree42e9bd83fb67daac3b2a6033b796046fce12adb5 /src/terminal.go
parented4442d9eaef9bc6dfb65b4f6c2b079060bbb4f7 (diff)
downloadfzf-66df24040fed3c76df545fc34b47387c86922786.tar.gz
Fix panic when use header border without pointer/marker (#4345)
Diffstat (limited to 'src/terminal.go')
-rw-r--r--src/terminal.go3
1 files changed, 3 insertions, 0 deletions
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
}