m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-17 07:43:39 -05:00

Reset full-background property after a new line

This commit is contained in:
Junegunn Choi
2025-06-27 23:21:48 +09:00
parent 19d858f9b6
commit 111266d832
2 changed files with 5 additions and 0 deletions

View File

@@ -287,6 +287,8 @@ func extractColor(str string, state *ansiState, proc func(string, *ansiState) bo
[2]int32{int32(runeCount), int32(runeCount)}, [2]int32{int32(runeCount), int32(runeCount)},
marker, marker,
}) })
// Reset the full-line background color
newState.lbg = -1
} }
} }

View File

@@ -88,6 +88,9 @@ func Run(opts *Options) (int, error) {
marker.color.attr = marker.color.attr | tui.FullBg marker.color.attr = marker.color.attr | tui.FullBg
newOffsets := append(*offsets, marker) newOffsets := append(*offsets, marker)
offsets = &newOffsets offsets = &newOffsets
// Reset the full-line background color
lineAnsiState.lbg = -1
} }
return util.ToChars(stringBytes(trimmed)), offsets return util.ToChars(stringBytes(trimmed)), offsets
} }