File tree 2 files changed +17
-2
lines changed
2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -518,7 +518,8 @@ void handleSelectAll() {
518
518
void handleCommentUncomment () {
519
519
Action action = textarea .getActionMap ().get (RSyntaxTextAreaEditorKit .rstaToggleCommentAction );
520
520
action .actionPerformed (null );
521
-
521
+ // XXX: RSyntaxDocument doesn't fire DocumentListener events, it should be fixed in RSyntaxTextArea?
522
+ editor .updateUndoRedoState ();
522
523
}
523
524
524
525
void handleDiscourseCopy () {
@@ -538,6 +539,8 @@ void handleIndentOutdent(boolean indent) {
538
539
Action action = textarea .getActionMap ().get (RSyntaxTextAreaEditorKit .rstaDecreaseIndentAction );
539
540
action .actionPerformed (null );
540
541
}
542
+ // XXX: RSyntaxDocument doesn't fire DocumentListener events, it should be fixed in RSyntaxTextArea?
543
+ editor .updateUndoRedoState ();
541
544
}
542
545
543
546
void handleUndo () {
Original file line number Diff line number Diff line change @@ -53,12 +53,24 @@ public void shouldUndoAndRedo() throws Exception {
53
53
jEditTextArea .selectAll ();
54
54
55
55
GuiActionRunner .execute (new GuiQuery <Frame >() {
56
-
57
56
protected Frame executeInEDT () {
58
57
window .getEditor ().getCurrentTab ().handleCommentUncomment ();
59
58
return window .getEditor ();
60
59
}
60
+ });
61
+
62
+ menuEditUndo .requireEnabled ();
63
+ menuEditUndo .click ();
64
+
65
+ assertEquals (previousText , jEditTextArea .getText ());
61
66
67
+ menuEditUndo .requireDisabled ();
68
+
69
+ GuiActionRunner .execute (new GuiQuery <Frame >() {
70
+ protected Frame executeInEDT () {
71
+ window .getEditor ().getCurrentTab ().handleIndentOutdent (true );
72
+ return window .getEditor ();
73
+ }
62
74
});
63
75
64
76
menuEditUndo .requireEnabled ();
You can’t perform that action at this time.
0 commit comments