Skip to content

Commit

Permalink
feat(cellbuf): always go to the beginning of the next line on Close
Browse files Browse the repository at this point in the history
This is a behavioral change. Previously, the last line was cleared on
Close. Now, the cursor is moved to the beginning of the next line.
  • Loading branch information
aymanbagabas committed Feb 10, 2025
1 parent 29729b0 commit 6aa2bdd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cellbuf/screen.go
Original file line number Diff line number Diff line change
Expand Up @@ -1358,8 +1358,8 @@ func (s *Screen) Close() (err error) {
s.updatePen(nil)
s.move(0, s.newbuf.Height()-1)

// TODO: Should we clear the last line?
// s.clearToEnd(nil, true)
// Scroll to the next line.
s.buf.WriteByte('\n') //nolint:errcheck

if s.altScreenMode {
s.buf.WriteString(ansi.ResetAltScreenSaveCursorMode)
Expand Down

0 comments on commit 6aa2bdd

Please sign in to comment.