mosh server: disable scrollback in VT emulator (saves ~200MB/session)

This commit is contained in:
realrasengan
2026-03-31 17:55:00 -07:00
parent 534e7da40d
commit f065464e2c
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -150,7 +150,7 @@ func (s *Server) Serve() error {
Cols: uint16(s.cols),
})
s.emu = vt.NewEmulator(s.cols, s.rows)
s.emu = vt.NewEmulatorNoScrollback(s.cols, s.rows)
s.curVisible.Store(true)
s.emu.SetCallbacks(vt.Callbacks{
CursorVisibility: func(visible bool) { s.curVisible.Store(visible) },
@@ -199,7 +199,7 @@ func (s *Server) Done() <-chan struct{} {
func (s *Server) ServeRW(rw io.ReadWriteCloser, resize func(cols, rows uint16)) error {
close(s.started)
s.emu = vt.NewEmulator(s.cols, s.rows)
s.emu = vt.NewEmulatorNoScrollback(s.cols, s.rows)
s.curVisible.Store(true)
s.emu.SetCallbacks(vt.Callbacks{
CursorVisibility: func(visible bool) { s.curVisible.Store(visible) },