-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
<!-- Thanks for your change! * Remember to *add tests* if you have added a new feature, or fixed a bug. Use the test case recorder: https://www.cursorless.org/docs/contributing/test-case-recorder * Remember to *update the docs* if you've added a new feature. Link: https://github.com/cursorless-dev/cursorless/tree/main/docs * Remember to *test the cheatsheet manually* if you've added a new action, modifier, or scope -- or changed any Talon files. --> If you said `"pour state air and line bat"` where `air` was a multiline statement you got an undefined exception at runtime. I have corrected the problem with our logic and also removed a not null assertion in favor of actually checking for null. ## Release notes `"pour state air and line bat"` (if `air` was a multiline statement) now works instead of raising an exception. --------- Co-authored-by: Phil Cohen <[email protected]>
- Loading branch information
1 parent
5be3d53
commit 6606f98
Showing
5 changed files
with
86 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
languageId: typescript | ||
command: | ||
version: 7 | ||
spokenForm: pour state air and line bat | ||
action: | ||
name: editNewLineAfter | ||
target: | ||
type: list | ||
elements: | ||
- type: primitive | ||
mark: {type: decoratedSymbol, symbolColor: default, character: a} | ||
modifiers: | ||
- type: containingScope | ||
scopeType: {type: statement} | ||
- type: primitive | ||
mark: {type: decoratedSymbol, symbolColor: default, character: b} | ||
modifiers: | ||
- type: containingScope | ||
scopeType: {type: line} | ||
usePrePhraseSnapshot: false | ||
initialState: | ||
documentContents: | | ||
function aaa() { | ||
} | ||
// bbb | ||
selections: | ||
- anchor: {line: 4, character: 0} | ||
active: {line: 4, character: 0} | ||
marks: | ||
default.a: | ||
start: {line: 0, character: 9} | ||
end: {line: 0, character: 12} | ||
default.b: | ||
start: {line: 3, character: 3} | ||
end: {line: 3, character: 6} | ||
finalState: | ||
documentContents: |+ | ||
function aaa() { | ||
} | ||
// bbb | ||
selections: | ||
- anchor: {line: 2, character: 0} | ||
active: {line: 2, character: 0} | ||
- anchor: {line: 5, character: 0} | ||
active: {line: 5, character: 0} | ||
thatMark: | ||
- type: UntypedTarget | ||
contentRange: | ||
start: {line: 0, character: 0} | ||
end: {line: 1, character: 1} | ||
isReversed: false | ||
hasExplicitRange: true | ||
- type: UntypedTarget | ||
contentRange: | ||
start: {line: 4, character: 0} | ||
end: {line: 4, character: 6} | ||
isReversed: false | ||
hasExplicitRange: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters