diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index 911dc2e746dd59e1749b67327e25f431fe3409b1..b0cf3bf9c4da0ee6c357b0852a19012db4a35110 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -180,6 +180,11 @@ class LanguageProvider { // e.g. */| beforeText: /^(\t|(\ \ ))*\ \*\/\s*$/, action: { indentAction: IndentAction.None, removeText: 1 } + }, + { + // e.g. *-----*/| + beforeText: /^(\t|(\ \ ))*\ \*[^/]*\*\/\s*$/, + action: { indentAction: IndentAction.None, removeText: 1 } } ], diff --git a/src/vs/editor/contrib/smartSelect/test/common/tokenSelectionSupport.test.ts b/src/vs/editor/contrib/smartSelect/test/common/tokenSelectionSupport.test.ts index b2ebca565fd4c4898d57699991e9193fa3dda387..2c60be0d67a8b645499282e213b6ccbee672890a 100644 --- a/src/vs/editor/contrib/smartSelect/test/common/tokenSelectionSupport.test.ts +++ b/src/vs/editor/contrib/smartSelect/test/common/tokenSelectionSupport.test.ts @@ -48,6 +48,11 @@ class MockJSMode extends MockTokenizingMode { // e.g. */| beforeText: /^(\t|(\ \ ))*\ \*\/\s*$/, action: { indentAction: IndentAction.None, removeText: 1 } + }, + { + // e.g. *-----*/| + beforeText: /^(\t|(\ \ ))*\ \*[^/]*\*\/\s*$/, + action: { indentAction: IndentAction.None, removeText: 1 } } ] }); diff --git a/src/vs/editor/test/common/commands/shiftCommand.test.ts b/src/vs/editor/test/common/commands/shiftCommand.test.ts index f4d5b1e0142220251232af297daf4a7c14114289..1efc7d72172a7655d5dc902f2cb1669e83acad4a 100644 --- a/src/vs/editor/test/common/commands/shiftCommand.test.ts +++ b/src/vs/editor/test/common/commands/shiftCommand.test.ts @@ -64,6 +64,11 @@ class DocBlockCommentMode extends MockMode { // e.g. */| beforeText: /^(\t|(\ \ ))*\ \*\/\s*$/, action: { indentAction: IndentAction.None, removeText: 1 } + }, + { + // e.g. *-----*/| + beforeText: /^(\t|(\ \ ))*\ \*[^/]*\*\/\s*$/, + action: { indentAction: IndentAction.None, removeText: 1 } } ] }); diff --git a/src/vs/editor/test/common/modes/supports/onEnter.test.ts b/src/vs/editor/test/common/modes/supports/onEnter.test.ts index 39688f929bdbb7a4bcef11431c7d447d9474bf50..b050594c95fa180de5e049742b5521efbc68aad7 100644 --- a/src/vs/editor/test/common/modes/supports/onEnter.test.ts +++ b/src/vs/editor/test/common/modes/supports/onEnter.test.ts @@ -93,6 +93,10 @@ suite('OnEnter', () => { { beforeText: /^(\t|(\ \ ))*\ \*\/\s*$/, action: { indentAction: IndentAction.None, removeText: 1 } + }, + { + beforeText: /^(\t|(\ \ ))*\ \*[^/]*\*\/\s*$/, + action: { indentAction: IndentAction.None, removeText: 1 } } ] }); @@ -131,7 +135,7 @@ suite('OnEnter', () => { testIndentAction('\t*', '', null, null); testIndentAction('\t *', '', IndentAction.None, '* '); testIndentAction('\t */', '', IndentAction.None, null, 1); - testIndentAction('\t * */', '', null, null); + testIndentAction('\t * */', '', IndentAction.None, null, 1); testIndentAction('\t * * / * / * / */', '', null, null); testIndentAction('\t * ', '', IndentAction.None, '* '); testIndentAction(' * ', '', IndentAction.None, '* '); @@ -146,5 +150,6 @@ suite('OnEnter', () => { testIndentAction(' */', '', IndentAction.None, null, 1); testIndentAction(' */', '', IndentAction.None, null, 1); testIndentAction('\t */', '', IndentAction.None, null, 1); + testIndentAction(' *--------------------------------------------------------------------------------------------*/', '', IndentAction.None, null, 1); }); }); \ No newline at end of file diff --git a/src/vs/languages/html/test/common/html.test.ts b/src/vs/languages/html/test/common/html.test.ts index 45c56182f8fc0c37b8998d6a24b4b2c3c5728b4f..1b4dba831f1aa927372df47a4424aaf699c41c40 100644 --- a/src/vs/languages/html/test/common/html.test.ts +++ b/src/vs/languages/html/test/common/html.test.ts @@ -60,6 +60,11 @@ class MockJSMode extends MockTokenizingMode { // e.g. */| beforeText: /^(\t|(\ \ ))*\ \*\/\s*$/, action: { indentAction: Modes.IndentAction.None, removeText: 1 } + }, + { + // e.g. *-----*/| + beforeText: /^(\t|(\ \ ))*\ \*[^/]*\*\/\s*$/, + action: { indentAction: Modes.IndentAction.None, removeText: 1 } } ] }); diff --git a/src/vs/languages/typescript/common/mode.ts b/src/vs/languages/typescript/common/mode.ts index acfe3bf11efcffb99a57c08898a21173ae23ce5b..a7763bac7dbec27c844ce837dea6d80c7cfe1666 100644 --- a/src/vs/languages/typescript/common/mode.ts +++ b/src/vs/languages/typescript/common/mode.ts @@ -73,6 +73,11 @@ const richEditConfiguration:IRichEditConfiguration = { // e.g. */| beforeText: /^(\t|(\ \ ))*\ \*\/\s*$/, action: { indentAction: modes.IndentAction.None, removeText: 1 } + }, + { + // e.g. *-----*/| + beforeText: /^(\t|(\ \ ))*\ \*[^/]*\*\/\s*$/, + action: { indentAction: modes.IndentAction.None, removeText: 1 } } ],