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