diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2025-05-30 20:42:55 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2025-05-30 20:43:20 +0900 |
| commit | a9d1d424364ecbdbdb204fc1ffb2463b44bf1e6c (patch) | |
| tree | abcb4fbe9ca648b3a73705811655163f56ef1b33 /src/tui | |
| parent | 1ecfa38eee94864bbaf4ba2bda8835dfbc845da6 (diff) | |
| download | fzf-a9d1d424364ecbdbdb204fc1ffb2463b44bf1e6c.tar.gz | |
Fix ANSI attributes lost when 'regular' attribute is set to fg or nth
Examples:
echo -e "\x1b[33;3mfoo \x1b[mbar" | fzf --ansi --color fg:regular
echo -e "\x1b[33;3mfoo \x1b[mbar" | fzf --ansi --color nth:regular
Diffstat (limited to 'src/tui')
| -rw-r--r-- | src/tui/dummy.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tui/dummy.go b/src/tui/dummy.go index cd856233..47c7d1e2 100644 --- a/src/tui/dummy.go +++ b/src/tui/dummy.go @@ -13,10 +13,10 @@ var DefaultBorderShape = BorderRounded func (a Attr) Merge(b Attr) Attr { if b&AttrRegular > 0 { // Only keep bold attribute set by the system - return b | (a & BoldForce) + return (b &^ AttrRegular) | (a & BoldForce) } - return a | b + return (a &^ AttrRegular) | b } const ( |
