diff --git a/CHANGELOG.md b/CHANGELOG.md index ffc74158..460f0b0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +### Fixed + +- Fix tab-to-spaces conversion in the code editor which was resulting in one less space being produced on tab than desired. + ## [0.18.0] - 2023-05-25 ### Changed diff --git a/src/playground-code-editor.ts b/src/playground-code-editor.ts index 74873047..4010e076 100644 --- a/src/playground-code-editor.ts +++ b/src/playground-code-editor.ts @@ -478,7 +478,7 @@ export class PlaygroundCodeEditor extends LitElement { extraKeys: { Tab: () => { cm.replaceSelection( - Array(cm.getOption('indentUnit') ?? 2).join(' ') + Array((cm.getOption('indentUnit') ?? 2) + 1).join(' ') ); }, // Ctrl + Space requests code completions.