diff --git a/packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/talon/cloneCommand.yml b/packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/talon/cloneCommand.yml new file mode 100644 index 0000000000..f4f4b6a12b --- /dev/null +++ b/packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/talon/cloneCommand.yml @@ -0,0 +1,29 @@ +languageId: talon +command: + version: 6 + spokenForm: clone command + action: + name: insertCopyAfter + target: + type: primitive + modifiers: + - type: containingScope + scopeType: {type: command} + usePrePhraseSnapshot: true +initialState: + documentContents: |- + foo: + "bar" + selections: + - anchor: {line: 0, character: 0} + active: {line: 0, character: 0} + marks: {} +finalState: + documentContents: |- + foo: + "bar" + foo: + "bar" + selections: + - anchor: {line: 2, character: 0} + active: {line: 2, character: 0} diff --git a/queries/talon.scm b/queries/talon.scm index d619085dc0..4275407c7b 100644 --- a/queries/talon.scm +++ b/queries/talon.scm @@ -119,9 +119,12 @@ ;;!! slap: key(enter) ;;! ^^^^^^^^^^^^^^^^ -(command_declaration - right: (_) @_.interior -) @command +( + (command_declaration + right: (_) @_.interior + ) @command + (#insertion-delimiter! @command "\n") +) (source_file (declarations) @command.iteration