We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 87c917f commit dd17388Copy full SHA for dd17388
app/src/processing/app/EditorTab.java
@@ -46,6 +46,7 @@
46
import javax.swing.text.PlainDocument;
47
import javax.swing.undo.UndoManager;
48
import javax.swing.text.DefaultCaret;
49
+import javax.swing.text.Document;
50
51
import org.fife.ui.rsyntaxtextarea.RSyntaxDocument;
52
import org.fife.ui.rsyntaxtextarea.RSyntaxTextAreaEditorKit;
@@ -402,7 +403,7 @@ public void setText(String what) {
402
403
int policy = caret.getUpdatePolicy();
404
caret.setUpdatePolicy(DefaultCaret.NEVER_UPDATE);
405
try {
- RSyntaxDocument doc = (RSyntaxDocument)textarea.getDocument();
406
+ Document doc = textarea.getDocument();
407
int oldLength = doc.getLength();
408
// The undo manager already seems to group the insert and remove together
409
// automatically, but better be explicit about it.
0 commit comments