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

Method insertTextRect

texteditor/text/lines.go:1017–1021  ·  view source on GitHub ↗

insertTextRect inserts a rectangle of text defined in given Edit record, (e.g., from RegionRect or DeleteRect). Returns a copy of the Edit record with an updated timestamp. An Undo record is automatically saved depending on Undo.Off setting.

(tbe *Edit)

Source from the content-addressed store, hash-verified

1015// Returns a copy of the Edit record with an updated timestamp.
1016// An Undo record is automatically saved depending on Undo.Off setting.
1017func (ls *Lines) insertTextRect(tbe *Edit) *Edit {
1018 re := ls.insertTextRectImpl(tbe)
1019 ls.saveUndo(re)
1020 return tbe
1021}
1022
1023func (ls *Lines) insertTextRectImpl(tbe *Edit) *Edit {
1024 st := tbe.Reg.Start

Callers 1

InsertTextRectMethod · 0.95

Calls 2

insertTextRectImplMethod · 0.95
saveUndoMethod · 0.95

Tested by

no test coverage detected