diff --git a/images/tryWrapFine.gif b/images/tryWrapFine.gif new file mode 100644 index 00000000000..d02b9e13c30 Binary files /dev/null and b/images/tryWrapFine.gif differ diff --git a/package.json b/package.json index 6a77655c4ff..dda6bde51c0 100644 --- a/package.json +++ b/package.json @@ -406,16 +406,16 @@ "type": "object", "scope": "language-overridable", "default": { - "cursorless.wrapper.ifStatement": { + "cursorless.wrappers.ifStatement": { "scopeType": "statement" }, - "cursorless.wrapper.tryCatchStatement": { + "cursorless.wrappers.tryCatchStatement": { "scopeType": "statement" }, - "cursorless.wrapper.ifElseStatementIfBranch": { + "cursorless.wrappers.ifElseStatementIfBranch": { "scopeType": "statement" }, - "cursorless.wrapper.ifElseStatementElseBranch": { + "cursorless.wrappers.ifElseStatementElseBranch": { "scopeType": "statement" } }, diff --git a/snippets/cpp.json b/snippets/cpp.json index dc94950cc51..225fda2e43b 100644 --- a/snippets/cpp.json +++ b/snippets/cpp.json @@ -1,23 +1,23 @@ { - "cursorless.wrapper.ifStatement": { + "cursorless.wrappers.ifStatement": { "body": [ "if ($1) {\n\t$TM_SELECTED_TEXT\n}" ], "description": "For wrapping selection in if statement" }, - "cursorless.wrapper.tryCatchStatement": { + "cursorless.wrappers.tryCatchStatement": { "body": [ "try {\n\t$TM_SELECTED_TEXT\n} catch ($1) {\n\t$0\n}" ], "description": "For wrapping selection in try-catch statement" }, - "cursorless.wrapper.ifElseStatementIfBranch": { + "cursorless.wrappers.ifElseStatementIfBranch": { "body": [ "if ($1) {\n\t$TM_SELECTED_TEXT\n} else {\n\t$0\n}" ], "description": "For wrapping selection in if branch of if-else statement" }, - "cursorless.wrapper.ifElseStatementElseBranch": { + "cursorless.wrappers.ifElseStatementElseBranch": { "body": [ "if ($1) {\n\t$0\n} else {\n\t$TM_SELECTED_TEXT\n}" ], diff --git a/snippets/csharp.json b/snippets/csharp.json index dc94950cc51..225fda2e43b 100644 --- a/snippets/csharp.json +++ b/snippets/csharp.json @@ -1,23 +1,23 @@ { - "cursorless.wrapper.ifStatement": { + "cursorless.wrappers.ifStatement": { "body": [ "if ($1) {\n\t$TM_SELECTED_TEXT\n}" ], "description": "For wrapping selection in if statement" }, - "cursorless.wrapper.tryCatchStatement": { + "cursorless.wrappers.tryCatchStatement": { "body": [ "try {\n\t$TM_SELECTED_TEXT\n} catch ($1) {\n\t$0\n}" ], "description": "For wrapping selection in try-catch statement" }, - "cursorless.wrapper.ifElseStatementIfBranch": { + "cursorless.wrappers.ifElseStatementIfBranch": { "body": [ "if ($1) {\n\t$TM_SELECTED_TEXT\n} else {\n\t$0\n}" ], "description": "For wrapping selection in if branch of if-else statement" }, - "cursorless.wrapper.ifElseStatementElseBranch": { + "cursorless.wrappers.ifElseStatementElseBranch": { "body": [ "if ($1) {\n\t$0\n} else {\n\t$TM_SELECTED_TEXT\n}" ], diff --git a/snippets/java.json b/snippets/java.json index dc94950cc51..225fda2e43b 100644 --- a/snippets/java.json +++ b/snippets/java.json @@ -1,23 +1,23 @@ { - "cursorless.wrapper.ifStatement": { + "cursorless.wrappers.ifStatement": { "body": [ "if ($1) {\n\t$TM_SELECTED_TEXT\n}" ], "description": "For wrapping selection in if statement" }, - "cursorless.wrapper.tryCatchStatement": { + "cursorless.wrappers.tryCatchStatement": { "body": [ "try {\n\t$TM_SELECTED_TEXT\n} catch ($1) {\n\t$0\n}" ], "description": "For wrapping selection in try-catch statement" }, - "cursorless.wrapper.ifElseStatementIfBranch": { + "cursorless.wrappers.ifElseStatementIfBranch": { "body": [ "if ($1) {\n\t$TM_SELECTED_TEXT\n} else {\n\t$0\n}" ], "description": "For wrapping selection in if branch of if-else statement" }, - "cursorless.wrapper.ifElseStatementElseBranch": { + "cursorless.wrappers.ifElseStatementElseBranch": { "body": [ "if ($1) {\n\t$0\n} else {\n\t$TM_SELECTED_TEXT\n}" ], diff --git a/snippets/python.json b/snippets/python.json index 0a8f66f9ab3..fa90183e208 100644 --- a/snippets/python.json +++ b/snippets/python.json @@ -1,23 +1,23 @@ { - "cursorless.wrapper.ifStatement": { + "cursorless.wrappers.ifStatement": { "body": [ "if $1:\n\t$TM_SELECTED_TEXT" ], "description": "For wrapping selection in if statement" }, - "cursorless.wrapper.tryCatchStatement": { + "cursorless.wrappers.tryCatchStatement": { "body": [ "try:\n\t$TM_SELECTED_TEXT\nexcept $1:\n\t" ], "description": "For wrapping selection in try-catch statement" }, - "cursorless.wrapper.ifElseStatementIfBranch": { + "cursorless.wrappers.ifElseStatementIfBranch": { "body": [ "if $1:\n\t$TM_SELECTED_TEXT\nelse:\n\t" ], "description": "For wrapping selection in if branch of if-else statement" }, - "cursorless.wrapper.ifElseStatementElseBranch": { + "cursorless.wrappers.ifElseStatementElseBranch": { "body": [ "if $1:\n\t$0\nelse:\n\t$TM_SELECTED_TEXT" ], diff --git a/snippets/typescript.json b/snippets/typescript.json index dc94950cc51..225fda2e43b 100644 --- a/snippets/typescript.json +++ b/snippets/typescript.json @@ -1,23 +1,23 @@ { - "cursorless.wrapper.ifStatement": { + "cursorless.wrappers.ifStatement": { "body": [ "if ($1) {\n\t$TM_SELECTED_TEXT\n}" ], "description": "For wrapping selection in if statement" }, - "cursorless.wrapper.tryCatchStatement": { + "cursorless.wrappers.tryCatchStatement": { "body": [ "try {\n\t$TM_SELECTED_TEXT\n} catch ($1) {\n\t$0\n}" ], "description": "For wrapping selection in try-catch statement" }, - "cursorless.wrapper.ifElseStatementIfBranch": { + "cursorless.wrappers.ifElseStatementIfBranch": { "body": [ "if ($1) {\n\t$TM_SELECTED_TEXT\n} else {\n\t$0\n}" ], "description": "For wrapping selection in if branch of if-else statement" }, - "cursorless.wrapper.ifElseStatementElseBranch": { + "cursorless.wrappers.ifElseStatementElseBranch": { "body": [ "if ($1) {\n\t$0\n} else {\n\t$TM_SELECTED_TEXT\n}" ], diff --git a/src/test/suite/fixtures/recorded/languages/cpp/elseStateWrapThis.yml b/src/test/suite/fixtures/recorded/languages/cpp/elseStateWrapThis.yml index 8e5cd5ad27d..26fc46e63de 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/elseStateWrapThis.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/elseStateWrapThis.yml @@ -4,14 +4,14 @@ command: actionName: wrapWithSnippet partialTargets: - type: primitive - mark: {type: cursor} - extraArgs: [cursorless.wrapper.ifElseStatementElseBranch] + mark: { type: cursor } + extraArgs: [cursorless.wrappers.ifElseStatementElseBranch] marks: {} initialState: documentContents: int foo = 0; selections: - - anchor: {line: 0, character: 6} - active: {line: 0, character: 6} + - anchor: { line: 0, character: 6 } + active: { line: 0, character: 6 } finalState: documentContents: |- if () { @@ -20,9 +20,20 @@ finalState: int foo = 0; } selections: - - anchor: {line: 0, character: 4} - active: {line: 0, character: 4} + - anchor: { line: 0, character: 4 } + active: { line: 0, character: 4 } thatMark: - - anchor: {line: 0, character: 0} - active: {line: 4, character: 1} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}] + - anchor: { line: 0, character: 0 } + active: { line: 4, character: 1 } +fullTargets: + [ + { + type: primitive, + mark: { type: cursor }, + selectionType: token, + position: contents, + insideOutsideType: inside, + modifier: + { type: containingScope, scopeType: statement, includeSiblings: false }, + }, + ] diff --git a/src/test/suite/fixtures/recorded/languages/cpp/ifElseWrapThis.yml b/src/test/suite/fixtures/recorded/languages/cpp/ifElseWrapThis.yml index 1fb5fe1ffc3..4895d9ab090 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/ifElseWrapThis.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/ifElseWrapThis.yml @@ -4,14 +4,14 @@ command: actionName: wrapWithSnippet partialTargets: - type: primitive - mark: {type: cursor} - extraArgs: [cursorless.wrapper.ifElseStatementIfBranch] + mark: { type: cursor } + extraArgs: [cursorless.wrappers.ifElseStatementIfBranch] marks: {} initialState: documentContents: int foo = 0; selections: - - anchor: {line: 0, character: 6} - active: {line: 0, character: 6} + - anchor: { line: 0, character: 6 } + active: { line: 0, character: 6 } finalState: documentContents: |- if () { @@ -20,9 +20,20 @@ finalState: } selections: - - anchor: {line: 0, character: 4} - active: {line: 0, character: 4} + - anchor: { line: 0, character: 4 } + active: { line: 0, character: 4 } thatMark: - - anchor: {line: 0, character: 0} - active: {line: 4, character: 1} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}] + - anchor: { line: 0, character: 0 } + active: { line: 4, character: 1 } +fullTargets: + [ + { + type: primitive, + mark: { type: cursor }, + selectionType: token, + position: contents, + insideOutsideType: inside, + modifier: + { type: containingScope, scopeType: statement, includeSiblings: false }, + }, + ] diff --git a/src/test/suite/fixtures/recorded/languages/cpp/ifStateWrapThis.yml b/src/test/suite/fixtures/recorded/languages/cpp/ifStateWrapThis.yml index a5cc07dfa33..74eb2ecbf97 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/ifStateWrapThis.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/ifStateWrapThis.yml @@ -4,23 +4,34 @@ command: actionName: wrapWithSnippet partialTargets: - type: primitive - mark: {type: cursor} - extraArgs: [cursorless.wrapper.ifStatement] + mark: { type: cursor } + extraArgs: [cursorless.wrappers.ifStatement] marks: {} initialState: documentContents: int foo = 0; selections: - - anchor: {line: 0, character: 6} - active: {line: 0, character: 6} + - anchor: { line: 0, character: 6 } + active: { line: 0, character: 6 } finalState: documentContents: |- if () { int foo = 0; } selections: - - anchor: {line: 0, character: 4} - active: {line: 0, character: 4} + - anchor: { line: 0, character: 4 } + active: { line: 0, character: 4 } 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}}] + - 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 }, + }, + ] diff --git a/src/test/suite/fixtures/recorded/languages/cpp/tryCatchWrapThis.yml b/src/test/suite/fixtures/recorded/languages/cpp/tryCatchWrapThis.yml index 586ad9f6dc6..148119968f5 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/tryCatchWrapThis.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/tryCatchWrapThis.yml @@ -4,14 +4,14 @@ command: actionName: wrapWithSnippet partialTargets: - type: primitive - mark: {type: cursor} - extraArgs: [cursorless.wrapper.tryCatchStatement] + mark: { type: cursor } + extraArgs: [cursorless.wrappers.tryCatchStatement] marks: {} initialState: documentContents: int foo = 0; selections: - - anchor: {line: 0, character: 6} - active: {line: 0, character: 6} + - anchor: { line: 0, character: 6 } + active: { line: 0, character: 6 } finalState: documentContents: |- try { @@ -20,9 +20,20 @@ finalState: } selections: - - anchor: {line: 2, character: 9} - active: {line: 2, character: 9} + - anchor: { line: 2, character: 9 } + active: { line: 2, character: 9 } thatMark: - - anchor: {line: 0, character: 0} - active: {line: 4, character: 1} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}] + - anchor: { line: 0, character: 0 } + active: { line: 4, character: 1 } +fullTargets: + [ + { + type: primitive, + mark: { type: cursor }, + selectionType: token, + position: contents, + insideOutsideType: inside, + modifier: + { type: containingScope, scopeType: statement, includeSiblings: false }, + }, + ] diff --git a/src/test/suite/fixtures/recorded/languages/cpp/tryCatchWrapThis2.yml b/src/test/suite/fixtures/recorded/languages/cpp/tryCatchWrapThis2.yml index c1021ad46ec..99fbc0f1877 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/tryCatchWrapThis2.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/tryCatchWrapThis2.yml @@ -4,8 +4,8 @@ command: actionName: wrapWithSnippet partialTargets: - type: primitive - mark: {type: cursor} - extraArgs: [cursorless.wrapper.tryCatchStatement] + mark: { type: cursor } + extraArgs: [cursorless.wrappers.tryCatchStatement] marks: {} initialState: documentContents: |- @@ -15,10 +15,10 @@ initialState: int bar = 1; selections: - - anchor: {line: 4, character: 0} - active: {line: 4, character: 0} - - anchor: {line: 0, character: 0} - active: {line: 0, character: 0} + - anchor: { line: 4, character: 0 } + active: { line: 4, character: 0 } + - anchor: { line: 0, character: 0 } + active: { line: 0, character: 0 } finalState: documentContents: |- try { @@ -35,13 +35,24 @@ finalState: } selections: - - anchor: {line: 10, character: 9} - active: {line: 10, character: 9} - - anchor: {line: 4, character: 9} - active: {line: 4, character: 9} + - anchor: { line: 10, character: 9 } + active: { line: 10, character: 9 } + - anchor: { line: 4, character: 9 } + active: { line: 4, character: 9 } thatMark: - - anchor: {line: 8, character: 0} - active: {line: 12, character: 1} - - anchor: {line: 0, character: 0} - active: {line: 6, character: 1} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}] + - anchor: { line: 8, character: 0 } + active: { line: 12, character: 1 } + - anchor: { line: 0, character: 0 } + active: { line: 6, character: 1 } +fullTargets: + [ + { + type: primitive, + mark: { type: cursor }, + selectionType: token, + position: contents, + insideOutsideType: inside, + modifier: + { type: containingScope, scopeType: statement, includeSiblings: false }, + }, + ] diff --git a/src/test/suite/fixtures/recorded/languages/csharp/elseStateWrapThis.yml b/src/test/suite/fixtures/recorded/languages/csharp/elseStateWrapThis.yml index dd748938736..d61401ef433 100644 --- a/src/test/suite/fixtures/recorded/languages/csharp/elseStateWrapThis.yml +++ b/src/test/suite/fixtures/recorded/languages/csharp/elseStateWrapThis.yml @@ -4,14 +4,14 @@ command: actionName: wrapWithSnippet partialTargets: - type: primitive - mark: {type: cursor} - extraArgs: [cursorless.wrapper.ifElseStatementElseBranch] + mark: { type: cursor } + extraArgs: [cursorless.wrappers.ifElseStatementElseBranch] marks: {} initialState: documentContents: int foo = 0; selections: - - anchor: {line: 0, character: 6} - active: {line: 0, character: 6} + - anchor: { line: 0, character: 6 } + active: { line: 0, character: 6 } finalState: documentContents: |- if () { @@ -20,9 +20,20 @@ finalState: int foo = 0; } selections: - - anchor: {line: 0, character: 4} - active: {line: 0, character: 4} + - anchor: { line: 0, character: 4 } + active: { line: 0, character: 4 } thatMark: - - anchor: {line: 0, character: 0} - active: {line: 4, character: 1} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}] + - anchor: { line: 0, character: 0 } + active: { line: 4, character: 1 } +fullTargets: + [ + { + type: primitive, + mark: { type: cursor }, + selectionType: token, + position: contents, + insideOutsideType: inside, + modifier: + { type: containingScope, scopeType: statement, includeSiblings: false }, + }, + ] diff --git a/src/test/suite/fixtures/recorded/languages/csharp/ifElseWrapThis.yml b/src/test/suite/fixtures/recorded/languages/csharp/ifElseWrapThis.yml index d2a4c952ab8..6e16bd2b733 100644 --- a/src/test/suite/fixtures/recorded/languages/csharp/ifElseWrapThis.yml +++ b/src/test/suite/fixtures/recorded/languages/csharp/ifElseWrapThis.yml @@ -4,14 +4,14 @@ command: actionName: wrapWithSnippet partialTargets: - type: primitive - mark: {type: cursor} - extraArgs: [cursorless.wrapper.ifElseStatementIfBranch] + mark: { type: cursor } + extraArgs: [cursorless.wrappers.ifElseStatementIfBranch] marks: {} initialState: documentContents: int foo = 0; selections: - - anchor: {line: 0, character: 6} - active: {line: 0, character: 6} + - anchor: { line: 0, character: 6 } + active: { line: 0, character: 6 } finalState: documentContents: |- if () { @@ -20,9 +20,20 @@ finalState: } selections: - - anchor: {line: 0, character: 4} - active: {line: 0, character: 4} + - anchor: { line: 0, character: 4 } + active: { line: 0, character: 4 } thatMark: - - anchor: {line: 0, character: 0} - active: {line: 4, character: 1} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}] + - anchor: { line: 0, character: 0 } + active: { line: 4, character: 1 } +fullTargets: + [ + { + type: primitive, + mark: { type: cursor }, + selectionType: token, + position: contents, + insideOutsideType: inside, + modifier: + { type: containingScope, scopeType: statement, includeSiblings: false }, + }, + ] diff --git a/src/test/suite/fixtures/recorded/languages/csharp/ifStateWrapThis.yml b/src/test/suite/fixtures/recorded/languages/csharp/ifStateWrapThis.yml index 6eb1757502f..14fa4f3dbfa 100644 --- a/src/test/suite/fixtures/recorded/languages/csharp/ifStateWrapThis.yml +++ b/src/test/suite/fixtures/recorded/languages/csharp/ifStateWrapThis.yml @@ -4,23 +4,34 @@ command: actionName: wrapWithSnippet partialTargets: - type: primitive - mark: {type: cursor} - extraArgs: [cursorless.wrapper.ifStatement] + mark: { type: cursor } + extraArgs: [cursorless.wrappers.ifStatement] marks: {} initialState: documentContents: int foo = 0; selections: - - anchor: {line: 0, character: 6} - active: {line: 0, character: 6} + - anchor: { line: 0, character: 6 } + active: { line: 0, character: 6 } finalState: documentContents: |- if () { int foo = 0; } selections: - - anchor: {line: 0, character: 4} - active: {line: 0, character: 4} + - anchor: { line: 0, character: 4 } + active: { line: 0, character: 4 } 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}}] + - 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 }, + }, + ] diff --git a/src/test/suite/fixtures/recorded/languages/csharp/tryCatchWrapThis.yml b/src/test/suite/fixtures/recorded/languages/csharp/tryCatchWrapThis.yml index 56c43788f04..ba2fc9499aa 100644 --- a/src/test/suite/fixtures/recorded/languages/csharp/tryCatchWrapThis.yml +++ b/src/test/suite/fixtures/recorded/languages/csharp/tryCatchWrapThis.yml @@ -4,14 +4,14 @@ command: actionName: wrapWithSnippet partialTargets: - type: primitive - mark: {type: cursor} - extraArgs: [cursorless.wrapper.tryCatchStatement] + mark: { type: cursor } + extraArgs: [cursorless.wrappers.tryCatchStatement] marks: {} initialState: documentContents: int foo = 0; selections: - - anchor: {line: 0, character: 6} - active: {line: 0, character: 6} + - anchor: { line: 0, character: 6 } + active: { line: 0, character: 6 } finalState: documentContents: |- try { @@ -20,9 +20,20 @@ finalState: } selections: - - anchor: {line: 2, character: 9} - active: {line: 2, character: 9} + - anchor: { line: 2, character: 9 } + active: { line: 2, character: 9 } thatMark: - - anchor: {line: 0, character: 0} - active: {line: 4, character: 1} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}] + - anchor: { line: 0, character: 0 } + active: { line: 4, character: 1 } +fullTargets: + [ + { + type: primitive, + mark: { type: cursor }, + selectionType: token, + position: contents, + insideOutsideType: inside, + modifier: + { type: containingScope, scopeType: statement, includeSiblings: false }, + }, + ] diff --git a/src/test/suite/fixtures/recorded/languages/csharp/tryCatchWrapThis2.yml b/src/test/suite/fixtures/recorded/languages/csharp/tryCatchWrapThis2.yml index 9b06aabeb14..f8237e8b60e 100644 --- a/src/test/suite/fixtures/recorded/languages/csharp/tryCatchWrapThis2.yml +++ b/src/test/suite/fixtures/recorded/languages/csharp/tryCatchWrapThis2.yml @@ -4,8 +4,8 @@ command: actionName: wrapWithSnippet partialTargets: - type: primitive - mark: {type: cursor} - extraArgs: [cursorless.wrapper.tryCatchStatement] + mark: { type: cursor } + extraArgs: [cursorless.wrappers.tryCatchStatement] marks: {} initialState: documentContents: |- @@ -15,10 +15,10 @@ initialState: int bar = 1; selections: - - anchor: {line: 4, character: 0} - active: {line: 4, character: 0} - - anchor: {line: 0, character: 0} - active: {line: 0, character: 0} + - anchor: { line: 4, character: 0 } + active: { line: 4, character: 0 } + - anchor: { line: 0, character: 0 } + active: { line: 0, character: 0 } finalState: documentContents: |- try { @@ -35,13 +35,24 @@ finalState: } selections: - - anchor: {line: 10, character: 9} - active: {line: 10, character: 9} - - anchor: {line: 4, character: 9} - active: {line: 4, character: 9} + - anchor: { line: 10, character: 9 } + active: { line: 10, character: 9 } + - anchor: { line: 4, character: 9 } + active: { line: 4, character: 9 } thatMark: - - anchor: {line: 8, character: 0} - active: {line: 12, character: 1} - - anchor: {line: 0, character: 0} - active: {line: 6, character: 1} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}] + - anchor: { line: 8, character: 0 } + active: { line: 12, character: 1 } + - anchor: { line: 0, character: 0 } + active: { line: 6, character: 1 } +fullTargets: + [ + { + type: primitive, + mark: { type: cursor }, + selectionType: token, + position: contents, + insideOutsideType: inside, + modifier: + { type: containingScope, scopeType: statement, includeSiblings: false }, + }, + ] diff --git a/src/test/suite/fixtures/recorded/languages/java/elseStateWrapThis.yml b/src/test/suite/fixtures/recorded/languages/java/elseStateWrapThis.yml index c59ac993f26..f6dac374d84 100644 --- a/src/test/suite/fixtures/recorded/languages/java/elseStateWrapThis.yml +++ b/src/test/suite/fixtures/recorded/languages/java/elseStateWrapThis.yml @@ -4,14 +4,14 @@ command: actionName: wrapWithSnippet partialTargets: - type: primitive - mark: {type: cursor} - extraArgs: [cursorless.wrapper.ifElseStatementElseBranch] + mark: { type: cursor } + extraArgs: [cursorless.wrappers.ifElseStatementElseBranch] marks: {} initialState: documentContents: int foo = 0; selections: - - anchor: {line: 0, character: 6} - active: {line: 0, character: 6} + - anchor: { line: 0, character: 6 } + active: { line: 0, character: 6 } finalState: documentContents: |- if () { @@ -20,9 +20,20 @@ finalState: int foo = 0; } selections: - - anchor: {line: 0, character: 4} - active: {line: 0, character: 4} + - anchor: { line: 0, character: 4 } + active: { line: 0, character: 4 } thatMark: - - anchor: {line: 0, character: 0} - active: {line: 4, character: 1} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}] + - anchor: { line: 0, character: 0 } + active: { line: 4, character: 1 } +fullTargets: + [ + { + type: primitive, + mark: { type: cursor }, + selectionType: token, + position: contents, + insideOutsideType: inside, + modifier: + { type: containingScope, scopeType: statement, includeSiblings: false }, + }, + ] diff --git a/src/test/suite/fixtures/recorded/languages/java/ifElseWrapThis.yml b/src/test/suite/fixtures/recorded/languages/java/ifElseWrapThis.yml index f4e8d7622ce..925a68508b6 100644 --- a/src/test/suite/fixtures/recorded/languages/java/ifElseWrapThis.yml +++ b/src/test/suite/fixtures/recorded/languages/java/ifElseWrapThis.yml @@ -4,14 +4,14 @@ command: actionName: wrapWithSnippet partialTargets: - type: primitive - mark: {type: cursor} - extraArgs: [cursorless.wrapper.ifElseStatementIfBranch] + mark: { type: cursor } + extraArgs: [cursorless.wrappers.ifElseStatementIfBranch] marks: {} initialState: documentContents: int foo = 0; selections: - - anchor: {line: 0, character: 6} - active: {line: 0, character: 6} + - anchor: { line: 0, character: 6 } + active: { line: 0, character: 6 } finalState: documentContents: |- if () { @@ -20,9 +20,20 @@ finalState: } selections: - - anchor: {line: 0, character: 4} - active: {line: 0, character: 4} + - anchor: { line: 0, character: 4 } + active: { line: 0, character: 4 } thatMark: - - anchor: {line: 0, character: 0} - active: {line: 4, character: 1} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}] + - anchor: { line: 0, character: 0 } + active: { line: 4, character: 1 } +fullTargets: + [ + { + type: primitive, + mark: { type: cursor }, + selectionType: token, + position: contents, + insideOutsideType: inside, + modifier: + { type: containingScope, scopeType: statement, includeSiblings: false }, + }, + ] diff --git a/src/test/suite/fixtures/recorded/languages/java/ifStateWrapThis.yml b/src/test/suite/fixtures/recorded/languages/java/ifStateWrapThis.yml index c0ebec992a3..26be2641e33 100644 --- a/src/test/suite/fixtures/recorded/languages/java/ifStateWrapThis.yml +++ b/src/test/suite/fixtures/recorded/languages/java/ifStateWrapThis.yml @@ -4,23 +4,34 @@ command: actionName: wrapWithSnippet partialTargets: - type: primitive - mark: {type: cursor} - extraArgs: [cursorless.wrapper.ifStatement] + mark: { type: cursor } + extraArgs: [cursorless.wrappers.ifStatement] marks: {} initialState: documentContents: int foo = 0; selections: - - anchor: {line: 0, character: 6} - active: {line: 0, character: 6} + - anchor: { line: 0, character: 6 } + active: { line: 0, character: 6 } finalState: documentContents: |- if () { int foo = 0; } selections: - - anchor: {line: 0, character: 4} - active: {line: 0, character: 4} + - anchor: { line: 0, character: 4 } + active: { line: 0, character: 4 } 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}}] + - 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 }, + }, + ] diff --git a/src/test/suite/fixtures/recorded/languages/java/tryCatchWrapThis.yml b/src/test/suite/fixtures/recorded/languages/java/tryCatchWrapThis.yml index 21f9a36d1f6..9fda1ef240e 100644 --- a/src/test/suite/fixtures/recorded/languages/java/tryCatchWrapThis.yml +++ b/src/test/suite/fixtures/recorded/languages/java/tryCatchWrapThis.yml @@ -4,14 +4,14 @@ command: actionName: wrapWithSnippet partialTargets: - type: primitive - mark: {type: cursor} - extraArgs: [cursorless.wrapper.tryCatchStatement] + mark: { type: cursor } + extraArgs: [cursorless.wrappers.tryCatchStatement] marks: {} initialState: documentContents: int foo = 0; selections: - - anchor: {line: 0, character: 6} - active: {line: 0, character: 6} + - anchor: { line: 0, character: 6 } + active: { line: 0, character: 6 } finalState: documentContents: |- try { @@ -20,9 +20,20 @@ finalState: } selections: - - anchor: {line: 2, character: 9} - active: {line: 2, character: 9} + - anchor: { line: 2, character: 9 } + active: { line: 2, character: 9 } thatMark: - - anchor: {line: 0, character: 0} - active: {line: 4, character: 1} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}] + - anchor: { line: 0, character: 0 } + active: { line: 4, character: 1 } +fullTargets: + [ + { + type: primitive, + mark: { type: cursor }, + selectionType: token, + position: contents, + insideOutsideType: inside, + modifier: + { type: containingScope, scopeType: statement, includeSiblings: false }, + }, + ] diff --git a/src/test/suite/fixtures/recorded/languages/java/tryCatchWrapThis2.yml b/src/test/suite/fixtures/recorded/languages/java/tryCatchWrapThis2.yml index c884ad9e27a..519eccbb038 100644 --- a/src/test/suite/fixtures/recorded/languages/java/tryCatchWrapThis2.yml +++ b/src/test/suite/fixtures/recorded/languages/java/tryCatchWrapThis2.yml @@ -4,8 +4,8 @@ command: actionName: wrapWithSnippet partialTargets: - type: primitive - mark: {type: cursor} - extraArgs: [cursorless.wrapper.tryCatchStatement] + mark: { type: cursor } + extraArgs: [cursorless.wrappers.tryCatchStatement] marks: {} initialState: documentContents: |- @@ -15,10 +15,10 @@ initialState: int bar = 1; selections: - - anchor: {line: 4, character: 0} - active: {line: 4, character: 0} - - anchor: {line: 0, character: 0} - active: {line: 0, character: 0} + - anchor: { line: 4, character: 0 } + active: { line: 4, character: 0 } + - anchor: { line: 0, character: 0 } + active: { line: 0, character: 0 } finalState: documentContents: |- try { @@ -35,13 +35,24 @@ finalState: } selections: - - anchor: {line: 10, character: 9} - active: {line: 10, character: 9} - - anchor: {line: 4, character: 9} - active: {line: 4, character: 9} + - anchor: { line: 10, character: 9 } + active: { line: 10, character: 9 } + - anchor: { line: 4, character: 9 } + active: { line: 4, character: 9 } thatMark: - - anchor: {line: 8, character: 0} - active: {line: 12, character: 1} - - anchor: {line: 0, character: 0} - active: {line: 6, character: 1} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}] + - anchor: { line: 8, character: 0 } + active: { line: 12, character: 1 } + - anchor: { line: 0, character: 0 } + active: { line: 6, character: 1 } +fullTargets: + [ + { + type: primitive, + mark: { type: cursor }, + selectionType: token, + position: contents, + insideOutsideType: inside, + modifier: + { type: containingScope, scopeType: statement, includeSiblings: false }, + }, + ] diff --git a/src/test/suite/fixtures/recorded/languages/python/elseStateWrapThis.yml b/src/test/suite/fixtures/recorded/languages/python/elseStateWrapThis.yml index d40ee770f83..70235e1f390 100644 --- a/src/test/suite/fixtures/recorded/languages/python/elseStateWrapThis.yml +++ b/src/test/suite/fixtures/recorded/languages/python/elseStateWrapThis.yml @@ -4,14 +4,14 @@ command: actionName: wrapWithSnippet partialTargets: - type: primitive - mark: {type: cursor} - extraArgs: [cursorless.wrapper.ifElseStatementElseBranch] + mark: { type: cursor } + extraArgs: [cursorless.wrappers.ifElseStatementElseBranch] marks: {} initialState: documentContents: foo = "hello" selections: - - anchor: {line: 0, character: 0} - active: {line: 0, character: 0} + - anchor: { line: 0, character: 0 } + active: { line: 0, character: 0 } finalState: documentContents: |- if : @@ -19,9 +19,20 @@ finalState: else: foo = "hello" selections: - - anchor: {line: 0, character: 3} - active: {line: 0, character: 3} + - anchor: { line: 0, character: 3 } + active: { line: 0, character: 3 } thatMark: - - anchor: {line: 0, character: 0} - active: {line: 3, character: 17} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}] + - anchor: { line: 0, character: 0 } + active: { line: 3, character: 17 } +fullTargets: + [ + { + type: primitive, + mark: { type: cursor }, + selectionType: token, + position: contents, + insideOutsideType: inside, + modifier: + { type: containingScope, scopeType: statement, includeSiblings: false }, + }, + ] diff --git a/src/test/suite/fixtures/recorded/languages/python/ifElseWrapThis.yml b/src/test/suite/fixtures/recorded/languages/python/ifElseWrapThis.yml index 96e3bd308b6..0a5c7b688ff 100644 --- a/src/test/suite/fixtures/recorded/languages/python/ifElseWrapThis.yml +++ b/src/test/suite/fixtures/recorded/languages/python/ifElseWrapThis.yml @@ -4,24 +4,35 @@ command: actionName: wrapWithSnippet partialTargets: - type: primitive - mark: {type: cursor} - extraArgs: [cursorless.wrapper.ifElseStatementIfBranch] + mark: { type: cursor } + extraArgs: [cursorless.wrappers.ifElseStatementIfBranch] marks: {} initialState: documentContents: foo = "hello" selections: - - anchor: {line: 0, character: 0} - active: {line: 0, character: 0} + - anchor: { line: 0, character: 0 } + active: { line: 0, character: 0 } finalState: documentContents: |- if : foo = "hello" else: - + selections: - - anchor: {line: 0, character: 3} - active: {line: 0, character: 3} + - anchor: { line: 0, character: 3 } + active: { line: 0, character: 3 } thatMark: - - anchor: {line: 0, character: 0} - active: {line: 3, character: 4} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}] + - anchor: { line: 0, character: 0 } + active: { line: 3, character: 4 } +fullTargets: + [ + { + type: primitive, + mark: { type: cursor }, + selectionType: token, + position: contents, + insideOutsideType: inside, + modifier: + { type: containingScope, scopeType: statement, includeSiblings: false }, + }, + ] diff --git a/src/test/suite/fixtures/recorded/languages/python/ifStateWrapThis.yml b/src/test/suite/fixtures/recorded/languages/python/ifStateWrapThis.yml index 1d3dc19e618..be83f63da8f 100644 --- a/src/test/suite/fixtures/recorded/languages/python/ifStateWrapThis.yml +++ b/src/test/suite/fixtures/recorded/languages/python/ifStateWrapThis.yml @@ -4,22 +4,33 @@ command: actionName: wrapWithSnippet partialTargets: - type: primitive - mark: {type: cursor} - extraArgs: [cursorless.wrapper.ifStatement] + mark: { type: cursor } + extraArgs: [cursorless.wrappers.ifStatement] marks: {} initialState: documentContents: foo = "hello" selections: - - anchor: {line: 0, character: 0} - active: {line: 0, character: 0} + - anchor: { line: 0, character: 0 } + active: { line: 0, character: 0 } finalState: documentContents: |- if : foo = "hello" selections: - - anchor: {line: 0, character: 3} - active: {line: 0, character: 3} + - anchor: { line: 0, character: 3 } + active: { line: 0, character: 3 } thatMark: - - anchor: {line: 0, character: 0} - active: {line: 1, character: 17} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}] + - anchor: { line: 0, character: 0 } + active: { line: 1, character: 17 } +fullTargets: + [ + { + type: primitive, + mark: { type: cursor }, + selectionType: token, + position: contents, + insideOutsideType: inside, + modifier: + { type: containingScope, scopeType: statement, includeSiblings: false }, + }, + ] diff --git a/src/test/suite/fixtures/recorded/languages/python/tryCatchWrapThis.yml b/src/test/suite/fixtures/recorded/languages/python/tryCatchWrapThis.yml index 0172bcef89d..61895cad4a9 100644 --- a/src/test/suite/fixtures/recorded/languages/python/tryCatchWrapThis.yml +++ b/src/test/suite/fixtures/recorded/languages/python/tryCatchWrapThis.yml @@ -4,24 +4,35 @@ command: actionName: wrapWithSnippet partialTargets: - type: primitive - mark: {type: cursor} - extraArgs: [cursorless.wrapper.tryCatchStatement] + mark: { type: cursor } + extraArgs: [cursorless.wrappers.tryCatchStatement] marks: {} initialState: documentContents: foo = "hello" selections: - - anchor: {line: 0, character: 0} - active: {line: 0, character: 0} + - anchor: { line: 0, character: 0 } + active: { line: 0, character: 0 } finalState: documentContents: |- try: foo = "hello" except : - + selections: - - anchor: {line: 2, character: 7} - active: {line: 2, character: 7} + - anchor: { line: 2, character: 7 } + active: { line: 2, character: 7 } thatMark: - - anchor: {line: 0, character: 0} - active: {line: 3, character: 4} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}] + - anchor: { line: 0, character: 0 } + active: { line: 3, character: 4 } +fullTargets: + [ + { + type: primitive, + mark: { type: cursor }, + selectionType: token, + position: contents, + insideOutsideType: inside, + modifier: + { type: containingScope, scopeType: statement, includeSiblings: false }, + }, + ] diff --git a/src/test/suite/fixtures/recorded/languages/python/tryCatchWrapThis2.yml b/src/test/suite/fixtures/recorded/languages/python/tryCatchWrapThis2.yml index 35f3559e2b5..c98780e9d1d 100644 --- a/src/test/suite/fixtures/recorded/languages/python/tryCatchWrapThis2.yml +++ b/src/test/suite/fixtures/recorded/languages/python/tryCatchWrapThis2.yml @@ -4,8 +4,8 @@ command: actionName: wrapWithSnippet partialTargets: - type: primitive - mark: {type: cursor} - extraArgs: [cursorless.wrapper.tryCatchStatement] + mark: { type: cursor } + extraArgs: [cursorless.wrappers.tryCatchStatement] marks: {} initialState: documentContents: |- @@ -14,10 +14,10 @@ initialState: bar = "hello" selections: - - anchor: {line: 3, character: 0} - active: {line: 3, character: 0} - - anchor: {line: 0, character: 0} - active: {line: 0, character: 0} + - anchor: { line: 3, character: 0 } + active: { line: 3, character: 0 } + - anchor: { line: 0, character: 0 } + active: { line: 0, character: 0 } finalState: documentContents: |- try: @@ -29,15 +29,26 @@ finalState: try: bar = "hello" except : - + selections: - - anchor: {line: 8, character: 7} - active: {line: 8, character: 7} - - anchor: {line: 3, character: 7} - active: {line: 3, character: 7} + - anchor: { line: 8, character: 7 } + active: { line: 8, character: 7 } + - anchor: { line: 3, character: 7 } + active: { line: 3, character: 7 } thatMark: - - anchor: {line: 6, character: 0} - active: {line: 9, character: 4} - - anchor: {line: 0, character: 0} - active: {line: 4, character: 4} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}] + - anchor: { line: 6, character: 0 } + active: { line: 9, character: 4 } + - anchor: { line: 0, character: 0 } + active: { line: 4, character: 4 } +fullTargets: + [ + { + type: primitive, + mark: { type: cursor }, + selectionType: token, + position: contents, + insideOutsideType: inside, + modifier: + { type: containingScope, scopeType: statement, includeSiblings: false }, + }, + ] diff --git a/src/test/suite/fixtures/recorded/languages/typescript/elseStateWrapThis.yml b/src/test/suite/fixtures/recorded/languages/typescript/elseStateWrapThis.yml index 8ae75339308..f9951eac07c 100644 --- a/src/test/suite/fixtures/recorded/languages/typescript/elseStateWrapThis.yml +++ b/src/test/suite/fixtures/recorded/languages/typescript/elseStateWrapThis.yml @@ -4,14 +4,14 @@ command: actionName: wrapWithSnippet partialTargets: - type: primitive - mark: {type: cursor} - extraArgs: [cursorless.wrapper.ifElseStatementElseBranch] + mark: { type: cursor } + extraArgs: [cursorless.wrappers.ifElseStatementElseBranch] marks: {} initialState: documentContents: const foo = "hello"; selections: - - anchor: {line: 0, character: 6} - active: {line: 0, character: 6} + - anchor: { line: 0, character: 6 } + active: { line: 0, character: 6 } finalState: documentContents: |- if () { @@ -20,9 +20,20 @@ finalState: const foo = "hello"; } selections: - - anchor: {line: 0, character: 4} - active: {line: 0, character: 4} + - anchor: { line: 0, character: 4 } + active: { line: 0, character: 4 } thatMark: - - anchor: {line: 0, character: 0} - active: {line: 4, character: 1} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}] + - anchor: { line: 0, character: 0 } + active: { line: 4, character: 1 } +fullTargets: + [ + { + type: primitive, + mark: { type: cursor }, + selectionType: token, + position: contents, + insideOutsideType: inside, + modifier: + { type: containingScope, scopeType: statement, includeSiblings: false }, + }, + ] diff --git a/src/test/suite/fixtures/recorded/languages/typescript/ifElseWrapThis.yml b/src/test/suite/fixtures/recorded/languages/typescript/ifElseWrapThis.yml index b99f385209c..c6a719a21cd 100644 --- a/src/test/suite/fixtures/recorded/languages/typescript/ifElseWrapThis.yml +++ b/src/test/suite/fixtures/recorded/languages/typescript/ifElseWrapThis.yml @@ -4,14 +4,14 @@ command: actionName: wrapWithSnippet partialTargets: - type: primitive - mark: {type: cursor} - extraArgs: [cursorless.wrapper.ifElseStatementIfBranch] + mark: { type: cursor } + extraArgs: [cursorless.wrappers.ifElseStatementIfBranch] marks: {} initialState: documentContents: const foo = "hello"; selections: - - anchor: {line: 0, character: 6} - active: {line: 0, character: 6} + - anchor: { line: 0, character: 6 } + active: { line: 0, character: 6 } finalState: documentContents: |- if () { @@ -20,9 +20,20 @@ finalState: } selections: - - anchor: {line: 0, character: 4} - active: {line: 0, character: 4} + - anchor: { line: 0, character: 4 } + active: { line: 0, character: 4 } thatMark: - - anchor: {line: 0, character: 0} - active: {line: 4, character: 1} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}] + - anchor: { line: 0, character: 0 } + active: { line: 4, character: 1 } +fullTargets: + [ + { + type: primitive, + mark: { type: cursor }, + selectionType: token, + position: contents, + insideOutsideType: inside, + modifier: + { type: containingScope, scopeType: statement, includeSiblings: false }, + }, + ] diff --git a/src/test/suite/fixtures/recorded/languages/typescript/ifStateWrapThis.yml b/src/test/suite/fixtures/recorded/languages/typescript/ifStateWrapThis.yml index 50123cbcf08..9740f479589 100644 --- a/src/test/suite/fixtures/recorded/languages/typescript/ifStateWrapThis.yml +++ b/src/test/suite/fixtures/recorded/languages/typescript/ifStateWrapThis.yml @@ -4,23 +4,34 @@ command: actionName: wrapWithSnippet partialTargets: - type: primitive - mark: {type: cursor} - extraArgs: [cursorless.wrapper.ifStatement] + mark: { type: cursor } + extraArgs: [cursorless.wrappers.ifStatement] marks: {} initialState: documentContents: const foo = "hello"; selections: - - anchor: {line: 0, character: 6} - active: {line: 0, character: 6} + - anchor: { line: 0, character: 6 } + active: { line: 0, character: 6 } finalState: documentContents: |- if () { const foo = "hello"; } selections: - - anchor: {line: 0, character: 4} - active: {line: 0, character: 4} + - anchor: { line: 0, character: 4 } + active: { line: 0, character: 4 } 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}}] + - 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 }, + }, + ] diff --git a/src/test/suite/fixtures/recorded/languages/typescript/tryCatchWrapThis.yml b/src/test/suite/fixtures/recorded/languages/typescript/tryCatchWrapThis.yml index aec28d79406..8af9959992c 100644 --- a/src/test/suite/fixtures/recorded/languages/typescript/tryCatchWrapThis.yml +++ b/src/test/suite/fixtures/recorded/languages/typescript/tryCatchWrapThis.yml @@ -4,14 +4,14 @@ command: actionName: wrapWithSnippet partialTargets: - type: primitive - mark: {type: cursor} - extraArgs: [cursorless.wrapper.tryCatchStatement] + mark: { type: cursor } + extraArgs: [cursorless.wrappers.tryCatchStatement] marks: {} initialState: documentContents: const foo = "hello"; selections: - - anchor: {line: 0, character: 6} - active: {line: 0, character: 6} + - anchor: { line: 0, character: 6 } + active: { line: 0, character: 6 } finalState: documentContents: |- try { @@ -20,9 +20,20 @@ finalState: } selections: - - anchor: {line: 2, character: 9} - active: {line: 2, character: 9} + - anchor: { line: 2, character: 9 } + active: { line: 2, character: 9 } thatMark: - - anchor: {line: 0, character: 0} - active: {line: 4, character: 1} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}] + - anchor: { line: 0, character: 0 } + active: { line: 4, character: 1 } +fullTargets: + [ + { + type: primitive, + mark: { type: cursor }, + selectionType: token, + position: contents, + insideOutsideType: inside, + modifier: + { type: containingScope, scopeType: statement, includeSiblings: false }, + }, + ] diff --git a/src/test/suite/fixtures/recorded/languages/typescript/tryCatchWrapThis2.yml b/src/test/suite/fixtures/recorded/languages/typescript/tryCatchWrapThis2.yml index 5b39e90d0d2..01608bf9b71 100644 --- a/src/test/suite/fixtures/recorded/languages/typescript/tryCatchWrapThis2.yml +++ b/src/test/suite/fixtures/recorded/languages/typescript/tryCatchWrapThis2.yml @@ -4,8 +4,8 @@ command: actionName: wrapWithSnippet partialTargets: - type: primitive - mark: {type: cursor} - extraArgs: [cursorless.wrapper.tryCatchStatement] + mark: { type: cursor } + extraArgs: [cursorless.wrappers.tryCatchStatement] marks: {} initialState: documentContents: |- @@ -15,10 +15,10 @@ initialState: const bar = "hello"; selections: - - anchor: {line: 4, character: 0} - active: {line: 4, character: 0} - - anchor: {line: 0, character: 0} - active: {line: 0, character: 0} + - anchor: { line: 4, character: 0 } + active: { line: 4, character: 0 } + - anchor: { line: 0, character: 0 } + active: { line: 0, character: 0 } finalState: documentContents: |- try { @@ -35,13 +35,24 @@ finalState: } selections: - - anchor: {line: 10, character: 9} - active: {line: 10, character: 9} - - anchor: {line: 4, character: 9} - active: {line: 4, character: 9} + - anchor: { line: 10, character: 9 } + active: { line: 10, character: 9 } + - anchor: { line: 4, character: 9 } + active: { line: 4, character: 9 } thatMark: - - anchor: {line: 8, character: 0} - active: {line: 12, character: 1} - - anchor: {line: 0, character: 0} - active: {line: 6, character: 1} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: containingScope, scopeType: statement, includeSiblings: false}}] + - anchor: { line: 8, character: 0 } + active: { line: 12, character: 1 } + - anchor: { line: 0, character: 0 } + active: { line: 6, character: 1 } +fullTargets: + [ + { + type: primitive, + mark: { type: cursor }, + selectionType: token, + position: contents, + insideOutsideType: inside, + modifier: + { type: containingScope, scopeType: statement, includeSiblings: false }, + }, + ]