Undo undo undoes next group of items on the undo stack
()
| 822 | |
| 823 | // undo undoes next group of items on the undo stack |
| 824 | func (tb *Buffer) undo() []*text.Edit { |
| 825 | autoSave := tb.batchUpdateStart() |
| 826 | defer tb.batchUpdateEnd(autoSave) |
| 827 | tbe := tb.Lines.Undo() |
| 828 | if tbe == nil || tb.Undos.Pos == 0 { // no more undo = fully undone |
| 829 | tb.SetChanged(false) |
| 830 | tb.notSaved = false |
| 831 | tb.AutoSaveDelete() |
| 832 | } |
| 833 | tb.signalMods() |
| 834 | return tbe |
| 835 | } |
| 836 | |
| 837 | // redo redoes next group of items on the undo stack, |
| 838 | // and returns the last record, nil if no more |
nothing calls this directly
no test coverage detected