RedoOneEvent redoes one event
()
| 327 | |
| 328 | // RedoOneEvent redoes one event |
| 329 | func (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 |
| 347 | func (eh *EventHandler) updateTrailingWs(t *TextEvent) { |