-
-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfixes: past token, past end of, subtoken out of range, sort tokens (…
…#229) * Support take token past * Support take past token * Added more tests * Better error message for sub token index out of range * No delimiters on start and end of positions * Sort multiple match tokens * Sort tokens on length * Sort tokens on length * Sort on alphanumeric as well * Added additional tests * Change directory * Add directory to a message * Changed inference on end * Added tests * find tokens by range * Renamed attributes * Add docstring * Fix multi-editor bug Co-authored-by: Pokey Rule <pokey.rule@gmail.com>
- Loading branch information
1 parent
0ad7888
commit 7a10719
Showing
28 changed files
with
659 additions
and
57 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
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
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
26 changes: 26 additions & 0 deletions
26
src/test/suite/fixtures/recorded/compoundTargets/takePastEndOfToken.yml
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,26 @@ | ||
spokenForm: take past end of token | ||
languageId: typescript | ||
command: | ||
actionName: setSelection | ||
partialTargets: | ||
- type: range | ||
start: {type: primitive} | ||
end: {type: primitive, position: after, insideOutsideType: inside, selectionType: token} | ||
excludeStart: false | ||
excludeEnd: false | ||
extraArgs: [] | ||
marks: {} | ||
initialState: | ||
documentContents: hello there | ||
selections: | ||
- anchor: {line: 0, character: 8} | ||
active: {line: 0, character: 8} | ||
finalState: | ||
documentContents: hello there | ||
selections: | ||
- anchor: {line: 0, character: 8} | ||
active: {line: 0, character: 11} | ||
thatMark: | ||
- anchor: {line: 0, character: 8} | ||
active: {line: 0, character: 11} | ||
fullTargets: [{type: range, excludeStart: false, excludeEnd: false, start: {type: primitive, mark: {type: cursor}, selectionType: token, position: contents, modifier: {type: identity}, insideOutsideType: inside}, end: {type: primitive, mark: {type: cursorToken}, selectionType: token, position: after, modifier: {type: identity}, insideOutsideType: inside}}] |
26 changes: 26 additions & 0 deletions
26
src/test/suite/fixtures/recorded/compoundTargets/takePastStartOfToken.yml
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,26 @@ | ||
spokenForm: take past start of token | ||
languageId: typescript | ||
command: | ||
actionName: setSelection | ||
partialTargets: | ||
- type: range | ||
start: {type: primitive} | ||
end: {type: primitive, position: before, insideOutsideType: inside, selectionType: token} | ||
excludeStart: false | ||
excludeEnd: false | ||
extraArgs: [] | ||
marks: {} | ||
initialState: | ||
documentContents: hello there | ||
selections: | ||
- anchor: {line: 0, character: 8} | ||
active: {line: 0, character: 8} | ||
finalState: | ||
documentContents: hello there | ||
selections: | ||
- anchor: {line: 0, character: 8} | ||
active: {line: 0, character: 6} | ||
thatMark: | ||
- anchor: {line: 0, character: 8} | ||
active: {line: 0, character: 6} | ||
fullTargets: [{type: range, excludeStart: false, excludeEnd: false, start: {type: primitive, mark: {type: cursor}, selectionType: token, position: contents, modifier: {type: identity}, insideOutsideType: inside}, end: {type: primitive, mark: {type: cursorToken}, selectionType: token, position: before, modifier: {type: identity}, insideOutsideType: inside}}] |
31 changes: 31 additions & 0 deletions
31
src/test/suite/fixtures/recorded/compoundTargets/takePastTrap.yml
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,31 @@ | ||
spokenForm: take past trap | ||
languageId: typescript | ||
command: | ||
actionName: setSelection | ||
partialTargets: | ||
- type: range | ||
start: {type: primitive} | ||
end: | ||
type: primitive | ||
mark: {type: decoratedSymbol, symbolColor: default, character: t} | ||
excludeStart: false | ||
excludeEnd: false | ||
extraArgs: [] | ||
marks: | ||
default.t: | ||
start: {line: 0, character: 6} | ||
end: {line: 0, character: 11} | ||
initialState: | ||
documentContents: hello there | ||
selections: | ||
- anchor: {line: 0, character: 3} | ||
active: {line: 0, character: 3} | ||
finalState: | ||
documentContents: hello there | ||
selections: | ||
- anchor: {line: 0, character: 3} | ||
active: {line: 0, character: 11} | ||
thatMark: | ||
- anchor: {line: 0, character: 3} | ||
active: {line: 0, character: 11} | ||
fullTargets: [{type: range, excludeStart: false, excludeEnd: false, start: {type: primitive, mark: {type: cursor}, selectionType: token, position: contents, modifier: {type: identity}, insideOutsideType: inside}, end: {type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: t}, selectionType: token, position: contents, modifier: {type: identity}, insideOutsideType: inside}}] |
Oops, something went wrong.