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

Method AppendTextLineMarkup

texteditor/text/lines.go:379–383  ·  view source on GitHub ↗

AppendTextLineMarkup appends one line of new text to end of lines, using insert, and appending a LF at the end of the line if it doesn't already have one. User-supplied markup is used. Returns the edit region.

(text []byte, markup []byte)

Source from the content-addressed store, hash-verified

377// insert, and appending a LF at the end of the line if it doesn't already
378// have one. User-supplied markup is used. Returns the edit region.
379func (ls *Lines) AppendTextLineMarkup(text []byte, markup []byte) *Edit {
380 ls.Lock()
381 defer ls.Unlock()
382 return ls.appendTextLineMarkup(text, markup)
383}
384
385// ReMarkup starts a background task of redoing the markup
386func (ls *Lines) ReMarkup() {

Callers

nothing calls this directly

Calls 3

appendTextLineMarkupMethod · 0.95
LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected