MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / onWindowChange

Method onWindowChange

modules/clibridge/clibridge.go:402–417  ·  view source on GitHub ↗
(connId connections.ConnectionId, cols, rows uint32)

Source from the content-addressed store, hash-verified

400}
401
402func (m *CLIBridgeModule) onWindowChange(connId connections.ConnectionId, cols, rows uint32) {
403 sess := m.getSession(connId)
404 if sess == nil {
405 return
406 }
407
408 sess.mu.Lock()
409 defer sess.mu.Unlock()
410
411 if sess.PtyFile != nil {
412 pty.Setsize(sess.PtyFile, &pty.Winsize{
413 Cols: uint16(cols),
414 Rows: uint16(rows),
415 })
416 }
417}
418
419func (m *CLIBridgeModule) onAutoComplete(req suggestions.AutoCompleteRequest) suggestions.AutoCompleteRequest {
420 if req.Cmd != `cli` {

Callers

nothing calls this directly

Calls 3

getSessionMethod · 0.95
LockMethod · 0.80
UnlockMethod · 0.80

Tested by

no test coverage detected