Skip to content

Commit

Permalink
fix(cellbuf): don't toggle auto wrap mode for zero-width cells
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Feb 5, 2025
1 parent b79668f commit 853c627
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cellbuf/screen.go
Original file line number Diff line number Diff line change
Expand Up @@ -618,10 +618,14 @@ func (s *Screen) putAttrCell(cell *Cell) {
func (s *Screen) putCellLR(cell *Cell) {
// Optimize for the lower right corner cell.
curX := s.cur.X
s.buf.WriteString(ansi.ResetAutoWrapMode) //nolint:errcheck
if cell == nil || cell.Width > 0 {
s.buf.WriteString(ansi.ResetAutoWrapMode) //nolint:errcheck
}
s.putAttrCell(cell)
s.cur.X = curX
s.buf.WriteString(ansi.SetAutoWrapMode) //nolint:errcheck
if cell == nil || cell.Width > 0 {
s.cur.X = curX
s.buf.WriteString(ansi.SetAutoWrapMode) //nolint:errcheck
}
}

// updatePen updates the cursor pen styles.
Expand Down

0 comments on commit 853c627

Please sign in to comment.