Skip to content

Commit d0b4153

Browse files
devbymaddejgroth
authored andcommitted
fix(code-editor): correctly render tab
1 parent 807f3e5 commit d0b4153

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/components/code-editor/code-editor.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,7 @@ export class CodeEditor {
182182
// the space count
183183
editor.setOption('extraKeys', {
184184
Tab: (codeMirror) => {
185-
const spaces = [codeMirror.getOption('indentUnit') + 1].join(
186-
' '
187-
);
185+
const spaces = ' '.repeat(codeMirror.getOption('indentUnit'));
188186
codeMirror.replaceSelection(spaces);
189187
},
190188
});

0 commit comments

Comments
 (0)