Skip to content

Commit 0873ac6

Browse files
committed
updated richtextFX to 8.1, added replacing tab symbols to spaces.
1 parent 3dbe777 commit 0873ac6

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ compileTestJava {
2424
options.compilerArgs += '-parameters'
2525
}
2626

27-
ext.jmeVersion = "3.2_branch-SNAPSHOT"
27+
ext.jmeVersion = "upgrade_lwjgl3-SNAPSHOT"
2828
ext.jme3_xbuf_version = '0.9.1'
2929
ext.lwjglVersion = "3.1.5"
3030
ext.junitPlatformVersion = "1.0.0"
@@ -54,7 +54,7 @@ javadoc {
5454
dependencies {
5555

5656
// base
57-
compile group: 'org.fxmisc.richtext', name: 'richtextfx', version: '0.7-M5'
57+
compile group: 'org.fxmisc.richtext', name: 'richtextfx', version: '0.8.1'
5858
compile 'org.controlsfx:controlsfx:8.40.13'
5959

6060
compile 'com.github.JavaSaBr:RlibFX:4.1.3'

src/main/java/com/ss/editor/ui/component/log/LogView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ private synchronized void update() {
166166
final String text = getText();
167167
replaceText(0, text.length(), newLog);
168168
try {
169-
setEstimatedScrollY(getTotalHeightEstimate());
169+
showParagraphAtTop(getParagraphs().size() - 1);
170170
} catch (final NullPointerException e) {
171171
}
172172
});

src/main/java/com/ss/editor/ui/control/code/BaseCodeArea.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import org.fxmisc.richtext.model.StyleSpansBuilder;
99
import org.fxmisc.undo.UndoManager;
1010
import org.jetbrains.annotations.NotNull;
11+
import org.jetbrains.annotations.Nullable;
1112

1213
import java.util.Collection;
1314
import java.util.regex.Matcher;
@@ -72,6 +73,16 @@ public BaseCodeArea() {
7273
.subscribe(change -> setStyleSpans(0, calculateStyleSpans(getText())));
7374
}
7475

76+
@Override
77+
public void replaceSelection(@Nullable String replacement) {
78+
79+
if ("\t".equals(replacement)) {
80+
replacement = " ";
81+
}
82+
83+
replaceText(getSelection(), replacement);
84+
}
85+
7586
/**
7687
* Create a list of available classes.
7788
*

0 commit comments

Comments
 (0)