Created
July 25, 2019 04:10
-
-
Save Daniel-Wang/4ed705c9b1d64e260104b8296980906f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case 'u': | |
{ | |
for (int i = 0; i < n; i++) { | |
if (!_app.commandStack().empty() && _app.commandStack().top()->canUndo()) { | |
_app.commandStack().top()->undo(); | |
_app.commandStack().pop(); | |
} | |
} | |
if (_app.commandStack().empty()) { | |
_app.textView().buffer().setUnsavedChanges(false); | |
_app.updateViews(); | |
_app.updateStatusView("Already at oldest change"); | |
} | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment