Skip to content

Commit 6e0ee57

Browse files
authored
Merge pull request #883 from live-codes/fix-console-line-numbers
do not show lineNumbers in console editor
2 parents ba8ceff + 2d6fa4c commit 6e0ee57

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

src/livecodes/core.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1969,11 +1969,12 @@ const loadSelectedScreen = () => {
19691969
return false;
19701970
};
19711971

1972-
const getAllEditors = (): CodeEditor[] => [
1973-
...Object.values(editors),
1974-
...[toolsPane?.console?.getEditor?.()],
1975-
...[toolsPane?.compiled?.getEditor?.()],
1976-
];
1972+
const getAllEditors = (): CodeEditor[] =>
1973+
[
1974+
...Object.values(editors),
1975+
toolsPane?.console?.getEditor?.(),
1976+
toolsPane?.compiled?.getEditor?.(),
1977+
].filter((x) => x != null);
19771978

19781979
const setTheme = (theme: Theme, editorTheme: Config['editorTheme']) => {
19791980
const themes = ['light', 'dark'];

src/livecodes/editor/monaco/monaco.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ export const createEditor = async (options: EditorOptions): Promise<CodeEditor>
189189
glyphMargin: true,
190190
folding: false,
191191
lineDecorationsWidth: 0,
192+
lineNumbers: 'off',
192193
lineNumbersMinChars: 0,
193194
scrollbar: {
194195
vertical: 'auto',

0 commit comments

Comments
 (0)