summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2024-12-14 22:42:40 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2024-12-14 22:42:40 +0900
commit789226ff6db54c95bb546d7565791c90fdfa2efb (patch)
tree4c560fba3e19622dc4a8daab05efa1b76b46170a
parent805efc5bf1411864f76d721c2c3e62d02bc315bc (diff)
downloadfzf-789226ff6db54c95bb546d7565791c90fdfa2efb.tar.gz
Fix test failure
cdcab26 removed excessive clearing of the windows. But it caused the problem where the right side of the preview window border was not cleared when hiding the preview window with the scrollbar disabled.
-rw-r--r--src/terminal.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/terminal.go b/src/terminal.go
index 4e301594..db91f611 100644
--- a/src/terminal.go
+++ b/src/terminal.go
@@ -2113,9 +2113,9 @@ func (t *Terminal) printList() {
func (t *Terminal) printBar(lineNum int, forceRedraw bool, barRange [2]int) bool {
hasBar := lineNum >= barRange[0] && lineNum < barRange[1]
- if len(t.scrollbar) > 0 && (hasBar != t.prevLines[lineNum].hasBar || forceRedraw) {
+ if hasBar != t.prevLines[lineNum].hasBar || forceRedraw {
t.move(lineNum, t.window.Width()-1, true)
- if hasBar {
+ if len(t.scrollbar) > 0 && hasBar {
t.window.CPrint(tui.ColScrollbar, t.scrollbar)
}
}