MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / Write

Method Write

tsunami/app/hooks.go:40–49  ·  view source on GitHub ↗

Write implements io.Writer by sending data to the terminal via TermWrite.

(p []byte)

Source from the content-addressed store, hash-verified

38
39// Write implements io.Writer by sending data to the terminal via TermWrite.
40func (tr *TermRef) Write(p []byte) (n int, err error) {
41 if tr.VDomRef == nil || !tr.VDomRef.HasCurrent.Load() {
42 return 0, fmt.Errorf("TermRef not current")
43 }
44 err = TermWrite(tr.VDomRef, string(p))
45 if err != nil {
46 return 0, err
47 }
48 return len(p), nil
49}
50
51// TermSize returns the current terminal size, or nil if not yet set.
52func (tr *TermRef) TermSize() *vdom.VDomTermSize {

Callers

nothing calls this directly

Calls 1

TermWriteFunction · 0.85

Tested by

no test coverage detected