javalover520 / jsyntaxpane

Automatically exported from code.google.com/p/jsyntaxpane
0 stars 0 forks source link

Undo/redo doesn't work after calling SyntaxDocument.clearUndos() #132

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

I have the following code:

JEditorPane jep; 

DefaultSyntaxKit.initKit();

(...)

jep.setContentType("text/java");

(...)

jep.setText(string containing code obtained from a file);

((jsyntaxpane.SyntaxDocument)jep.getDocument()).clearUndos();

What is the expected output? What do you see instead?

I expect the undo/redo system to work after the call to clearUndos() 
(except that it shouldn't undo the setText() action that I do in the code, 
which was the reason for the clearUndos()).

Instead, the undo/redo system doesn't seem to work at all after the call 
to clearUndos(). It doesn't undo any action that I perform later.

If I remove the line with clearUndos(), the undo/redo system does work.

What version of the product are you using? On what operating system?

jsyntaxpane-0.9.5-b27.jar, Java 1.6, Windows Vista

Original issue reported on code.google.com by komoku on 9 Feb 2010 at 3:27

GoogleCodeExporter commented 8 years ago
This works for me with a version 0.9.6 (version r156 of the svn).

Original comment by martin.q...@ens-rennes.fr on 17 Aug 2013 at 11:12