mirror of
https://github.com/db9979/sshtermy.git
synced 2026-12-06 12:44:08 +01:00
* MIT-Lizenz; Terminal-Verlauf kompakt, schnellerer Bildlauf, Manager mit vielen Verbindungen schneller - LICENSE (MIT), winget/Homebrew/apt-Metadaten, README, Webseite, --version - termemu: Verlauf mit 8 statt 112 Byte pro Zeichen, Ringpuffer - third_party/vt: angepasste Kopie (rotateLines, SetScrollbackHook) - Store: Connections() zwischengespeichert; Manager: buildRows ohne Teillisten, Fußzeile misst Breiten einmal - Benchmarks: make bench Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUjBAAPCAZVnGzCZxdS * Testprogramm aus dem Commit entfernt Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUjBAAPCAZVnGzCZxdS * Testprogramm entfernt, *.test ignorieren Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUjBAAPCAZVnGzCZxdS * TestSerialSession: auf stehenden Prompt warten statt auf das erste # Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUjBAAPCAZVnGzCZxdS --------- Co-authored-by: Claude <noreply@anthropic.com>
38 lines
828 B
Go
38 lines
828 B
Go
package vt
|
|
|
|
import (
|
|
"github.com/charmbracelet/x/ansi"
|
|
)
|
|
|
|
// handleEsc handles an escape sequence.
|
|
func (e *Emulator) handleEsc(cmd ansi.Cmd) {
|
|
e.flushGrapheme() // Flush any pending grapheme before handling ESC sequences.
|
|
if !e.handlers.handleEsc(int(cmd)) {
|
|
var str string
|
|
if inter := cmd.Intermediate(); inter != 0 {
|
|
str += string(inter) + " "
|
|
}
|
|
if final := cmd.Final(); final != 0 {
|
|
str += string(final)
|
|
}
|
|
e.logf("unhandled sequence: ESC %q", str)
|
|
}
|
|
}
|
|
|
|
// fullReset performs a full terminal reset as in [ansi.RIS].
|
|
func (e *Emulator) fullReset() {
|
|
e.scrs[0].Reset()
|
|
e.scrs[1].Reset()
|
|
e.resetTabStops()
|
|
|
|
// XXX: Do we reset all modes here? Investigate.
|
|
e.resetModes()
|
|
|
|
e.gl, e.gr = 0, 1
|
|
e.gsingle = 0
|
|
e.charsets = [4]CharSet{}
|
|
e.atPhantom = false
|
|
e.grapheme = e.grapheme[:0]
|
|
e.lastChar = 0
|
|
}
|