Skip to content

Commit bee6ed7

Browse files
Added insertion delimiter to Talon command (#1789)
Fixes #1785 ## Checklist - [x] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [/] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [/] I have not broken the cheatsheet
1 parent 5a9be05 commit bee6ed7

File tree

2 files changed

+35
-3
lines changed

2 files changed

+35
-3
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
languageId: talon
2+
command:
3+
version: 6
4+
spokenForm: clone command
5+
action:
6+
name: insertCopyAfter
7+
target:
8+
type: primitive
9+
modifiers:
10+
- type: containingScope
11+
scopeType: {type: command}
12+
usePrePhraseSnapshot: true
13+
initialState:
14+
documentContents: |-
15+
foo:
16+
"bar"
17+
selections:
18+
- anchor: {line: 0, character: 0}
19+
active: {line: 0, character: 0}
20+
marks: {}
21+
finalState:
22+
documentContents: |-
23+
foo:
24+
"bar"
25+
foo:
26+
"bar"
27+
selections:
28+
- anchor: {line: 2, character: 0}
29+
active: {line: 2, character: 0}

queries/talon.scm

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,12 @@
119119

120120
;;!! slap: key(enter)
121121
;;! ^^^^^^^^^^^^^^^^
122-
(command_declaration
123-
right: (_) @_.interior
124-
) @command
122+
(
123+
(command_declaration
124+
right: (_) @_.interior
125+
) @command
126+
(#insertion-delimiter! @command "\n")
127+
)
125128

126129
(source_file
127130
(declarations) @command.iteration

0 commit comments

Comments
 (0)