diff --git a/src/languages/typescript.ts b/src/languages/typescript.ts index 48ee0de0ce..95e9cc6001 100644 --- a/src/languages/typescript.ts +++ b/src/languages/typescript.ts @@ -46,7 +46,7 @@ const STATEMENT_TYPES = [ "lexical_declaration", "module", "return_statement", - "statement_block", +// "statement_block", This is disabled since we want the whole statement and not just the block "switch_statement", "throw_statement", "try_statement", diff --git a/src/test/suite/fixtures/recorded/languages/typescript/takeState2.yml b/src/test/suite/fixtures/recorded/languages/typescript/takeState2.yml new file mode 100644 index 0000000000..cc9280e1d0 --- /dev/null +++ b/src/test/suite/fixtures/recorded/languages/typescript/takeState2.yml @@ -0,0 +1,29 @@ +spokenForm: take state +languageId: typescript +command: + actionName: setSelection + partialTargets: + - type: primitive + modifier: {type: containingScope, scopeType: statement, includeSiblings: false} + extraArgs: [] +initialState: + documentContents: |- + if (true) { + + } + selections: + - anchor: {line: 1, character: 0} + active: {line: 1, character: 0} + marks: {} +finalState: + documentContents: |- + if (true) { + + } + selections: + - anchor: {line: 0, character: 0} + active: {line: 2, character: 1} + thatMark: + - anchor: {line: 0, character: 0} + active: {line: 2, character: 1} +fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}]