Skip to content

Commit

Permalink
fix(cellbuf): clear attributes don't apply to colors
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Dec 22, 2024
1 parent 0d34f0e commit d67f793
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions cellbuf/cell.go
Original file line number Diff line number Diff line change
Expand Up @@ -477,9 +477,8 @@ func (s *Style) Empty() bool {
// Clear returns whether the style consists of only attributes that don't
// affect appearance of a space character.
func (s *Style) Clear() bool {
return s.Fg == nil && s.Bg == nil &&
s.UlStyle == NoUnderline &&
s.Attrs&^(BoldAttr|FaintAttr|ItalicAttr) == 0
return s.UlStyle == NoUnderline &&
s.Attrs&^(BoldAttr|FaintAttr|ItalicAttr|SlowBlinkAttr|RapidBlinkAttr) == 0
}

func runesEqual(a, b []rune) bool {
Expand Down
2 changes: 1 addition & 1 deletion cellbuf/window.go
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ func (s *Screen) transformLine(y int) {
s.move(firstCell, y)
if oLastCell-nLastCell > el0Cost {
if s.putRange(oldLine, newLine, y, firstCell, nLastCell) {
s.move(nLastCell, y)
s.move(nLastCell+1, y)
}
s.clearToEnd(blank, false)
} else {
Expand Down

0 comments on commit d67f793

Please sign in to comment.