From 5e14e2e569cd728fd69bda7e79a340fa6ceba816 Mon Sep 17 00:00:00 2001 From: Aiday Marlen Kyzy Date: Wed, 20 Mar 2024 18:57:31 +0100 Subject: [PATCH] adding one more test for the incorrect indentation within comments --- .../test/browser/indentation.test.ts | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/vs/editor/contrib/indentation/test/browser/indentation.test.ts b/src/vs/editor/contrib/indentation/test/browser/indentation.test.ts index 6b78736694f..9ca3ac32414 100644 --- a/src/vs/editor/contrib/indentation/test/browser/indentation.test.ts +++ b/src/vs/editor/contrib/indentation/test/browser/indentation.test.ts @@ -666,6 +666,31 @@ suite('`Full` Auto Indent On Type - TypeScript/JavaScript', () => { }); }); + test.skip('issue #208232: incorrect indentation inside of comments', () => { + + // https://github.com/microsoft/vscode/issues/208232 + + const model = createTextModel([ + '/**', + 'indentation done for {', + '*/' + ].join('\n'), languageId, {}); + disposables.add(model); + + withTestCodeEditor(model, { autoIndent: "full" }, (editor, viewModel, instantiationService) => { + + registerLanguage(instantiationService, languageId, Language.TypeScript, disposables); + editor.setSelection(new Selection(2, 23, 2, 23)); + viewModel.type("\n", 'keyboard'); + assert.strictEqual(model.getValue(), [ + '/**', + 'indentation done for {', + '', + '*/' + ].join('\n')); + }); + }); + // Add tests for: // https://github.com/microsoft/vscode/issues/88638 // https://github.com/microsoft/vscode/issues/63388