Fixed Script editors - tab size now matches indent size

This commit is contained in:
Jindra Petřík
2023-11-06 16:55:18 +01:00
parent c76df82d39
commit 84a76052a0
3 changed files with 5 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file.
## [Unreleased]
### Fixed
- [#2021], [#2000] Caret position in editors when using tabs and / or unicode
- Script editors - tab size now matches indent size
## [20.0.0] - 2023-11-05
### Added

View File

@@ -376,7 +376,7 @@ public class ASMSourceEditorPane extends DebuggableEditorPane implements CaretLi
}
super.setText(highlightedText.text);
setCaretPosition(0);
setCaretPosition(0);
}
@Override

View File

@@ -36,6 +36,7 @@ import javax.swing.text.BadLocationException;
import javax.swing.text.Document;
import javax.swing.text.EditorKit;
import javax.swing.text.JTextComponent;
import javax.swing.text.PlainDocument;
import jsyntaxpane.SyntaxDocument;
/**
@@ -162,6 +163,8 @@ public class UndoFixedEditorPane extends JEditorPane {
((SyntaxDocument) doc).setIgnoreUpdate(false);
}
doc.putProperty(PlainDocument.tabSizeAttribute, Configuration.indentSize.get());
setDocument(doc);
} catch (BadLocationException | IOException ex) {
Logger.getLogger(UndoFixedEditorPane.class.getName()).log(Level.SEVERE, null, ex);