Skip to content

Commit 79a9233

Browse files
committed
use bounded value
1 parent 743891e commit 79a9233

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

jme3-glsl-highlighter/src/com/jme3/gde/glsl/highlighter/editor/GlslIndentTask.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public void reindent() throws BadLocationException {
6060
int startOffsetBounded = Math.max(startOffset - 1, 0);
6161

6262
//Check if previous line ends with a {
63-
int previousLineLength = Math.max(startOffset - 1 - context.lineStartOffset(startOffsetBounded), 0);
63+
int previousLineLength = Math.max(startOffsetBounded - context.lineStartOffset(startOffsetBounded), 0);
6464
String previousLine = doc.getText(context.lineStartOffset(startOffsetBounded), previousLineLength);
6565

6666
//Hook other reasons for changes in indentation into this for loop

0 commit comments

Comments
 (0)