linesDeleted deletes lines of text and reformats remaining one
(tbe *text.Edit)
| 378 | |
| 379 | // linesDeleted deletes lines of text and reformats remaining one |
| 380 | func (ed *Editor) linesDeleted(tbe *text.Edit) { |
| 381 | stln := tbe.Reg.Start.Ln |
| 382 | edln := tbe.Reg.End.Ln |
| 383 | dsz := edln - stln |
| 384 | |
| 385 | ed.renders = append(ed.renders[:stln], ed.renders[edln:]...) |
| 386 | ed.offsets = append(ed.offsets[:stln], ed.offsets[edln:]...) |
| 387 | |
| 388 | ed.NumLines -= dsz |
| 389 | ed.NeedsLayout() |
| 390 | } |
| 391 | |
| 392 | // bufferSignal receives a signal from the Buffer when the underlying text |
| 393 | // is changed. |
no test coverage detected