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

Method deleteTextRect

texteditor/text/lines.go:928–932  ·  view source on GitHub ↗

deleteTextRect deletes rectangular region of text between start, end defining the upper-left and lower-right corners of a rectangle. Fails if st.Ch >= ed.Ch. Sets the timestamp on resulting Edit to now. An Undo record is automatically saved depending on Undo.Off setting.

(st, ed lexer.Pos)

Source from the content-addressed store, hash-verified

926// Fails if st.Ch >= ed.Ch. Sets the timestamp on resulting Edit to now.
927// An Undo record is automatically saved depending on Undo.Off setting.
928func (ls *Lines) deleteTextRect(st, ed lexer.Pos) *Edit {
929 tbe := ls.deleteTextRectImpl(st, ed)
930 ls.saveUndo(tbe)
931 return tbe
932}
933
934func (ls *Lines) deleteTextRectImpl(st, ed lexer.Pos) *Edit {
935 tbe := ls.regionRect(st, ed)

Callers 1

DeleteTextRectMethod · 0.95

Calls 2

deleteTextRectImplMethod · 0.95
saveUndoMethod · 0.95

Tested by

no test coverage detected