summaryrefslogtreecommitdiffstats
path: root/devtools/client/debugger/src/utils/editor/source-documents.js
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/client/debugger/src/utils/editor/source-documents.js')
-rw-r--r--devtools/client/debugger/src/utils/editor/source-documents.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/devtools/client/debugger/src/utils/editor/source-documents.js b/devtools/client/debugger/src/utils/editor/source-documents.js
index 53ee4f2f35..cc9f44d82a 100644
--- a/devtools/client/debugger/src/utils/editor/source-documents.js
+++ b/devtools/client/debugger/src/utils/editor/source-documents.js
@@ -4,7 +4,11 @@
import { isWasm, getWasmLineNumberFormatter, renderWasmText } from "../wasm";
import { isMinified } from "../isMinified";
-import { resizeBreakpointGutter, resizeToggleButton } from "../ui";
+import {
+ resizeBreakpointGutter,
+ resizeToggleButton,
+ getLineNumberWidth,
+} from "../ui";
import { javascriptLikeExtensions } from "../source";
const sourceDocs = new Map();
@@ -39,7 +43,7 @@ export function resetLineNumberFormat(editor) {
const cm = editor.codeMirror;
cm.setOption("lineNumberFormatter", number => number);
resizeBreakpointGutter(cm);
- resizeToggleButton(cm);
+ resizeToggleButton(getLineNumberWidth(cm));
}
function updateLineNumberFormat(editor, sourceId) {
@@ -51,7 +55,7 @@ function updateLineNumberFormat(editor, sourceId) {
const lineNumberFormatter = getWasmLineNumberFormatter(sourceId);
cm.setOption("lineNumberFormatter", lineNumberFormatter);
resizeBreakpointGutter(cm);
- resizeToggleButton(cm);
+ resizeToggleButton(getLineNumberWidth(cm));
}
const contentTypeModeMap = new Map([