File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -518,7 +518,8 @@ void handleSelectAll() {
518518 void handleCommentUncomment () {
519519 Action action = textarea .getActionMap ().get (RSyntaxTextAreaEditorKit .rstaToggleCommentAction );
520520 action .actionPerformed (null );
521-
521+ // XXX: RSyntaxDocument doesn't fire DocumentListener events, it should be fixed in RSyntaxTextArea?
522+ editor .updateUndoRedoState ();
522523 }
523524
524525 void handleDiscourseCopy () {
@@ -538,6 +539,8 @@ void handleIndentOutdent(boolean indent) {
538539 Action action = textarea .getActionMap ().get (RSyntaxTextAreaEditorKit .rstaDecreaseIndentAction );
539540 action .actionPerformed (null );
540541 }
542+ // XXX: RSyntaxDocument doesn't fire DocumentListener events, it should be fixed in RSyntaxTextArea?
543+ editor .updateUndoRedoState ();
541544 }
542545
543546 void handleUndo () {
Original file line number Diff line number Diff line change @@ -53,12 +53,24 @@ public void shouldUndoAndRedo() throws Exception {
5353 jEditTextArea .selectAll ();
5454
5555 GuiActionRunner .execute (new GuiQuery <Frame >() {
56-
5756 protected Frame executeInEDT () {
5857 window .getEditor ().getCurrentTab ().handleCommentUncomment ();
5958 return window .getEditor ();
6059 }
60+ });
61+
62+ menuEditUndo .requireEnabled ();
63+ menuEditUndo .click ();
64+
65+ assertEquals (previousText , jEditTextArea .getText ());
6166
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+ }
6274 });
6375
6476 menuEditUndo .requireEnabled ();
You can’t perform that action at this time.
0 commit comments