summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2024-10-15 17:34:20 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2024-10-15 17:35:11 +0900
commita24eb9967919c75bf19406c390ec0ae62f0ddb18 (patch)
tree80854f6cfae32fa0b69759c9555516cf7f77254b /src
parentad113d00b7601c4d2983a542a9004c3d371c733a (diff)
downloadfzf-a24eb9967919c75bf19406c390ec0ae62f0ddb18.tar.gz
Fix full line background in preview window
Diffstat (limited to 'src')
-rw-r--r--src/terminal.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/terminal.go b/src/terminal.go
index ce299de4..4ee72d84 100644
--- a/src/terminal.go
+++ b/src/terminal.go
@@ -2721,11 +2721,15 @@ Loop:
url = nil
t.pwindow.LinkEnd()
}
+ if ansi != nil {
+ lbg = ansi.lbg
+ } else {
+ lbg = -1
+ }
str, width := t.processTabs(trimmed, prefixWidth)
if width > prefixWidth {
prefixWidth = width
if t.theme.Colored && ansi != nil && ansi.colored() {
- lbg = ansi.lbg
fillRet = t.pwindow.CFill(ansi.fg, ansi.bg, ansi.attr, str)
} else {
fillRet = t.pwindow.CFill(tui.ColPreview.Fg(), tui.ColPreview.Bg(), tui.AttrRegular, str)
@@ -2747,7 +2751,7 @@ Loop:
if unchanged && lineNo == 0 {
break
}
- if lbg >= 0 {
+ if t.theme.Colored && lbg >= 0 {
fillRet = t.pwindow.CFill(-1, lbg, tui.AttrRegular,
strings.Repeat(" ", t.pwindow.Width()-t.pwindow.X())+"\n")
} else {