Skip to content

Commit 00c1a3b

Browse files
committed
Renamed editor.auto_close_braces pref and set default value
1 parent 8ecbded commit 00c1a3b

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

app/src/processing/app/EditorTab.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ private SketchTextArea createTextArea(RSyntaxDocument document)
148148
textArea.setMarginLineEnabled(false);
149149
textArea.setCodeFoldingEnabled(PreferencesData.getBoolean("editor.code_folding"));
150150
textArea.setAutoIndentEnabled(PreferencesData.getBoolean("editor.indent"));
151-
textArea.setCloseCurlyBraces(PreferencesData.getBoolean("editor.autocomplete"));
151+
textArea.setCloseCurlyBraces(PreferencesData.getBoolean("editor.auto_close_braces", true));
152152
textArea.setAntiAliasingEnabled(PreferencesData.getBoolean("editor.antialias"));
153153
textArea.setTabsEmulated(PreferencesData.getBoolean("editor.tabs.expand"));
154154
textArea.setTabSize(PreferencesData.getInteger("editor.tabs.size"));

arduino-core/src/processing/app/PreferencesData.java

+7
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,13 @@ static public void unset(String attribute) {
176176
prefs.remove(attribute);
177177
}
178178

179+
static public boolean getBoolean(String attribute, boolean defaultValue) {
180+
if (has(attribute)) {
181+
return getBoolean(attribute);
182+
}
183+
184+
return defaultValue;
185+
}
179186

180187
static public boolean getBoolean(String attribute) {
181188
return prefs.getBoolean(attribute);

build/shared/lib/preferences.txt

+2-3
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,8 @@ editor.tabs.size = 2
146146
# automatically indent each line
147147
editor.indent = true
148148

149-
# enable/disable any 'autocomplete' features
150-
# this currently includes 'auto curly brace'
151-
editor.autocomplete = true
149+
# enable/disable auto-close of curly brace
150+
editor.auto_close_braces = true
152151

153152
# size of divider between editing area and the console
154153
editor.divider.size = 0

0 commit comments

Comments
 (0)