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

Method redo

texteditor/editor.go:460–474  ·  view source on GitHub ↗

redo redoes previously undone action

()

Source from the content-addressed store, hash-verified

458
459// redo redoes previously undone action
460func (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.
477func (ed *Editor) styleEditor() {

Callers 1

keyInputMethod · 0.95

Calls 4

SetCursorShowMethod · 0.95
savePosHistoryMethod · 0.95
NeedsRenderMethod · 0.80

Tested by

no test coverage detected