diff --git a/data/io.elementary.code.gschema.xml b/data/io.elementary.code.gschema.xml
index 1794882fa..d0bad47f8 100644
--- a/data/io.elementary.code.gschema.xml
+++ b/data/io.elementary.code.gschema.xml
@@ -121,6 +121,7 @@
Whether Code should use auto indentation
+
4
Tab Size
Specifies the number of spaces that should be displayed instead of Tab characters.
diff --git a/src/Widgets/FormatBar.vala b/src/Widgets/FormatBar.vala
index 33ed28aa4..53d4673ee 100644
--- a/src/Widgets/FormatBar.vala
+++ b/src/Widgets/FormatBar.vala
@@ -158,7 +158,7 @@ public class Code.FormatBar : Gtk.Box {
hexpand = true
};
- width_spinbutton = new Gtk.SpinButton.with_range (1, 24, 1);
+ width_spinbutton = new Gtk.SpinButton.with_range (2, 16, 1);
tab_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12) {
margin_top = 6,
@@ -193,7 +193,7 @@ public class Code.FormatBar : Gtk.Box {
if (!tab_width_set_by_editor_config) {
Scratch.settings.set_int (
"indent-width",
- ((int)width_spinbutton.@value).clamp (2, 16)
+ (int)width_spinbutton.@value
);
}
});