diff --git a/src/components/EditorPanel.tsx b/src/components/EditorPanel.tsx index 1efbf06..b7523f1 100644 --- a/src/components/EditorPanel.tsx +++ b/src/components/EditorPanel.tsx @@ -193,6 +193,8 @@ export default function EditorPanel({className, style}: {className?: string, sty onMount={onMount} // TODO: This looks a bit silly, does it trigger a re-render?? options={{ ...openscadEditorOptions, + + lineNumbers: state.view.lineNumbers ? 'on' : 'off', // readOnly: !isFileWritable(state.params.sourcePath) }} /> diff --git a/src/components/SettingsMenu.tsx b/src/components/SettingsMenu.tsx index 9b5ca27..89b646e 100644 --- a/src/components/SettingsMenu.tsx +++ b/src/components/SettingsMenu.tsx @@ -38,6 +38,12 @@ export default function SettingsMenu({className, style}: {className?: string, st // disabled: true, command: () => model.mutate(s => s.view.showShadows = !s.view.showShadows) }, + { + label: state.view.lineNumbers ? 'Hide line numbers' : 'Show line numbers', + icon: 'pi pi-list', + // disabled: true, + command: () => model.mutate(s => s.view.lineNumbers = !s.view.lineNumbers) + }, ] as MenuItem[]} popup ref={settingsMenu} />