Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git

moved undo() and redo() methods from FileEditor to MarkdownEditorPane

AuthorKarl Tauber <email>
Date2015-07-31 10:21:52 GMT+0200
Commit0d0f8fb7404bc95765e277f2001d1ba417d67f60
Parentc90cd87
Delta10 lines added, 2 lines removed, 8-line increase
src/main/java/org/markdownwriterfx/editor/MarkdownEditorPane.java
}
+ public void undo() {
+ textArea.getUndoManager().undo();
+ }
+
+ public void redo() {
+ textArea.getUndoManager().redo();
+ }
+
public void surroundSelection(String leading, String trailing) {
surroundSelection(leading, trailing, null);
src/main/java/org/markdownwriterfx/MainWindow.java
// Edit actions
Action editUndoAction = new Action("Undo", "Shortcut+Z", UNDO,
- e -> fileEditorTabPane.getActiveFileEditor().undo(),
+ e -> getActiveEditor().undo(),
createActiveBooleanProperty(FileEditor::canUndoProperty).not());
Action editRedoAction = new Action("Redo", "Shortcut+Y", REPEAT,
- e -> fileEditorTabPane.getActiveFileEditor().redo(),
+ e -> getActiveEditor().redo(),
createActiveBooleanProperty(FileEditor::canRedoProperty).not());