MCPcopy
hub / github.com/micro-editor/micro / RedoOneEvent

Method RedoOneEvent

internal/buffer/eventhandler.go:329–344  ·  view source on GitHub ↗

RedoOneEvent redoes one event

()

Source from the content-addressed store, hash-verified

327
328// RedoOneEvent redoes one event
329func (eh *EventHandler) RedoOneEvent() {
330 t := eh.RedoStack.Pop()
331 if t == nil {
332 return
333 }
334
335 if t.C.Num >= 0 && t.C.Num < len(eh.cursors) {
336 eh.cursors[t.C.Num].Goto(t.C)
337 eh.cursors[t.C.Num].NewTrailingWsY = t.C.NewTrailingWsY
338 }
339
340 // Modifies the text event
341 eh.UndoTextEvent(t)
342
343 eh.UndoStack.Push(t)
344}
345
346// updateTrailingWs updates the cursor's trailing whitespace status after a text event
347func (eh *EventHandler) updateTrailingWs(t *TextEvent) {

Callers 2

RedoMethod · 0.95
checkFunction · 0.80

Calls 4

UndoTextEventMethod · 0.95
PopMethod · 0.80
GotoMethod · 0.80
PushMethod · 0.80

Tested by 1

checkFunction · 0.64