We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c058f72 commit 87024f3Copy full SHA for 87024f3
sshd/terminal/terminal.go
@@ -322,6 +322,11 @@ func (t *Terminal) clearLineToRight() {
322
t.queue(op)
323
}
324
325
+func (t *Terminal) clearScreenBelow() {
326
+ op := []rune{keyEscape, '[', 'J'}
327
+ t.queue(op)
328
+}
329
+
330
const maxLineLength = 4096
331
332
func (t *Terminal) setLine(newLine []rune, newPos int) {
@@ -528,6 +533,7 @@ func (t *Terminal) handleKey(key rune) (line string, ok bool) {
528
533
// prompt is retained.
529
534
t.moveCursorToPos(0)
530
535
t.clearLineToRight()
536
+ t.clearScreenBelow() // Necessary for wrapped lines
531
537
} else {
532
538
// Pushing the line up resets the cursor to 0,0 and we render a
539
// fresh prompt.
0 commit comments