redo redoes previously undone action
()
| 458 | |
| 459 | // redo redoes previously undone action |
| 460 | func (ed *Editor) redo() { |
| 461 | tbes := ed.Buffer.redo() |
| 462 | if tbes != nil { |
| 463 | tbe := tbes[len(tbes)-1] |
| 464 | if tbe.Delete { |
| 465 | ed.SetCursorShow(tbe.Reg.Start) |
| 466 | } else { |
| 467 | ed.SetCursorShow(tbe.Reg.End) |
| 468 | } |
| 469 | } else { |
| 470 | ed.scrollCursorToCenterIfHidden() |
| 471 | } |
| 472 | ed.savePosHistory(ed.CursorPos) |
| 473 | ed.NeedsRender() |
| 474 | } |
| 475 | |
| 476 | // styleEditor applies the editor styles. |
| 477 | func (ed *Editor) styleEditor() { |
no test coverage detected