From 243f91ec52b7098060285948e36429a7fc4b807f Mon Sep 17 00:00:00 2001 From: Jason Laster Date: Thu, 11 Jan 2018 17:20:09 -0500 Subject: [PATCH] Fix codefolding --- src/utils/editor/create-editor.js | 8 ++++---- src/utils/prefs.js | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/utils/editor/create-editor.js b/src/utils/editor/create-editor.js index 58ae4f4f73..7abe4df093 100644 --- a/src/utils/editor/create-editor.js +++ b/src/utils/editor/create-editor.js @@ -5,19 +5,19 @@ // @flow import SourceEditor from "./source-editor"; -import { isEnabled } from "devtools-config"; +import { features } from "../prefs"; export function createEditor() { const gutters = ["breakpoints", "hit-markers", "CodeMirror-linenumbers"]; - if (isEnabled("codeFolding")) { + if (features.codeFolding) { gutters.push("CodeMirror-foldgutter"); } return new SourceEditor({ mode: "javascript", - foldGutter: isEnabled("codeFolding"), - enableCodeFolding: isEnabled("codeFolding"), + foldGutter: features.codeFolding, + enableCodeFolding: features.codeFolding, readOnly: true, lineNumbers: true, theme: "mozilla", diff --git a/src/utils/prefs.js b/src/utils/prefs.js index 3476828e74..489c7d3ec4 100644 --- a/src/utils/prefs.js +++ b/src/utils/prefs.js @@ -45,7 +45,7 @@ if (isDevelopment()) { pref("devtools.debugger.features.remove-command-bar-options", true); pref("devtools.debugger.features.code-coverage", false); pref("devtools.debugger.features.event-listeners", false); - pref("devtools.debugger.features.code-folding", true); + pref("devtools.debugger.features.code-folding", false); pref("devtools.debugger.features.outline", true); pref("devtools.debugger.features.column-breakpoints", true); } @@ -87,7 +87,8 @@ export const features = new PrefsHelper("devtools.debugger.features", { workers: ["Bool", "workers"], codeCoverage: ["Bool", "code-coverage"], eventListeners: ["Bool", "event-listeners"], - outline: ["Bool", "outline"] + outline: ["Bool", "outline"], + codeFolding: ["Bool", "code-folding"] }); if (prefs.debuggerPrefsSchemaVersion !== prefsSchemaVersion) {