MCPcopy Create free account
hub / github.com/cogentcore/core / Init

Method Init

texteditor/buffer.go:186–196  ·  view source on GitHub ↗

Init initializes the buffer. Called automatically in SetText.

()

Source from the content-addressed store, hash-verified

184
185// Init initializes the buffer. Called automatically in SetText.
186func (tb *Buffer) Init() {
187 if tb.MarkupDoneFunc != nil {
188 return
189 }
190 tb.MarkupDoneFunc = func() {
191 tb.signalEditors(bufferMarkupUpdated, nil)
192 }
193 tb.ChangedFunc = func() {
194 tb.notSaved = true
195 }
196}
197
198// SetText sets the text to the given bytes.
199// Pass nil to initialize an empty buffer.

Callers 1

SetTextMethod · 0.95

Calls 1

signalEditorsMethod · 0.95

Tested by

no test coverage detected