Skip to content

Commit

Permalink
fix(cellbuf): wrap when the cursor is at the end of the window
Browse files Browse the repository at this point in the history
Fixes: cbdcc21 (fix(cellbuf): SetContent should truncate the string if it doesn't fit in the window)
  • Loading branch information
aymanbagabas committed Jan 7, 2025
1 parent cbdcc21 commit 48b574a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cellbuf/window.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ func (c *Window) drawString(s string, x, y int, opts *drawOpts) {
cell = newGraphemeCell(seq, width)
}

if !opts.truncate && x+width > c.x+c.w {
if !opts.truncate && x >= c.w {
// Auto wrap the cursor.
wrapCursor()
if y >= c.h {
Expand Down

0 comments on commit 48b574a

Please sign in to comment.