mirror of
https://github.com/junegunn/fzf.git
synced 2025-07-31 20:22:01 -07:00
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
This commit is contained in:
@@ -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 (
|
||||
|
Reference in New Issue
Block a user