Skip to content

Commit 6258e02

Browse files
author
Federico Fissore
committed
Line highlighting setting was read from preferences while it's stored in theme.txt. Fixed and disabled line highlighting by default since no one has never seen it. Fixes #1228
1 parent fc8d903 commit 6258e02

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

app/src/processing/app/Editor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ public void applyPreferences() {
504504

505505
} else {
506506
textarea.setBackground(Theme.getColor("editor.bgcolor"));
507-
textarea.setHighlightCurrentLine(PreferencesData.getBoolean("editor.linehighlight"));
507+
textarea.setHighlightCurrentLine(Theme.getBoolean("editor.linehighlight"));
508508
textarea.setEditable(true);
509509
}
510510

app/src/processing/app/syntax/SketchTextArea.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,15 @@
3232

3333
import org.apache.commons.compress.utils.IOUtils;
3434
import org.fife.ui.rsyntaxtextarea.*;
35-
import org.fife.ui.rsyntaxtextarea.Theme;
3635
import org.fife.ui.rsyntaxtextarea.Token;
3736
import org.fife.ui.rsyntaxtextarea.focusabletip.FocusableTip;
3837
import org.fife.ui.rtextarea.RTextArea;
3938
import org.fife.ui.rtextarea.RTextAreaUI;
4039
import org.fife.ui.rtextarea.RUndoManager;
41-
import processing.app.*;
40+
import processing.app.Base;
41+
import processing.app.BaseNoGui;
42+
import processing.app.EditorListener;
43+
import processing.app.PreferencesData;
4244

4345
import javax.swing.*;
4446
import javax.swing.event.EventListenerList;
@@ -107,6 +109,7 @@ private void setTheme(String name) throws IOException {
107109
}
108110

109111
setBackground(processing.app.Theme.getColor("editor.bgcolor"));
112+
setHighlightCurrentLine(processing.app.Theme.getBoolean("editor.linehighlight"));
110113
setCurrentLineHighlightColor(processing.app.Theme.getColor("editor.linehighlight.color"));
111114
setCaretColor(processing.app.Theme.getColor("editor.caret.color"));
112115
setSelectedTextColor(null);

build/shared/lib/theme/theme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ editor.bgcolor = #ffffff
5050
# highlight for the current line
5151
editor.linehighlight.color=#e2e2e2
5252
# highlight for the current line
53-
editor.linehighlight=true
53+
editor.linehighlight=false
5454

5555
# caret blinking and caret color
5656
editor.caret.color = #333300

0 commit comments

Comments
 (0)