summaryrefslogtreecommitdiff
path: root/src/terminal.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2025-07-06 20:04:03 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2025-07-06 20:24:23 +0900
commitd364a1122e23149a6fb2e060fe5f7a0dbb752b20 (patch)
treee83d89f3d90c0c13d6d65038279303e8a696e47d /src/terminal.go
parentfb570e94e79571ede2b467fadab36fb245da0d34 (diff)
downloadfzf-d364a1122e23149a6fb2e060fe5f7a0dbb752b20.tar.gz
Fix regression where header is not updated
Diffstat (limited to 'src/terminal.go')
-rw-r--r--src/terminal.go15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/terminal.go b/src/terminal.go
index 634d7859..adffbab5 100644
--- a/src/terminal.go
+++ b/src/terminal.go
@@ -2901,16 +2901,19 @@ func (t *Terminal) resizeIfNeeded() bool {
// Check if the header borders are used and header has changed
allHeaderLines := t.visibleHeaderLines()
primaryHeaderLines := allHeaderLines
- if t.hasHeaderLinesWindow() {
+ needHeaderWindow := t.hasHeaderWindow()
+ needHeaderLinesWindow := t.hasHeaderLinesWindow()
+ if needHeaderLinesWindow {
primaryHeaderLines -= t.headerLines
}
// FIXME: Full redraw is triggered if there are too many lines in the header
// so that the header window cannot display all of them.
- needHeaderLinesWindow := t.hasHeaderLinesWindow()
- if (t.headerBorderShape.Visible() || needHeaderLinesWindow) &&
- (t.headerWindow == nil && primaryHeaderLines > 0 || t.headerWindow != nil && primaryHeaderLines != t.headerWindow.Height()) ||
- needHeaderLinesWindow && (t.headerLinesWindow == nil || t.headerLinesWindow != nil && t.headerLines != t.headerLinesWindow.Height()) ||
- !needHeaderLinesWindow && t.headerLinesWindow != nil {
+ if (needHeaderWindow && t.headerWindow == nil) ||
+ (!needHeaderWindow && t.headerWindow != nil) ||
+ (needHeaderWindow && t.headerWindow != nil && primaryHeaderLines != t.headerWindow.Height()) ||
+ (needHeaderLinesWindow && t.headerLinesWindow == nil) ||
+ (!needHeaderLinesWindow && t.headerLinesWindow != nil) ||
+ (needHeaderLinesWindow && t.headerLinesWindow != nil && t.headerLines != t.headerLinesWindow.Height()) {
t.printAll()
return true
}