Skip to content

Commit acea36a

Browse files
committed
Fix item in hash not selecting both key and value
1 parent 599e8a3 commit acea36a

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

packages/cursorless-engine/languages/perl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const nodeMatchers: Partial<
3131
anonymousFunction: "anonymous_function",
3232
regularExpression: ["regex_pattern", "regex_pattern_qr"],
3333
collectionKey: "*[key]", // TODO: child of "value: hash?"
34-
collectionItem: "*[value]", // TODO: child of "value: hash?"
34+
collectionItem: "hash[variable]",
3535
argumentOrParameter: [
3636
"empty_parenthesized_argument",
3737
"parenthesized_argument",

packages/cursorless-vscode-e2e/suite/fixtures/recorded/languages/perl/changeItem.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ finalState:
2626
two => 2,
2727
);
2828
selections:
29-
- anchor: {line: 1, character: 11}
30-
active: {line: 1, character: 11}
29+
- anchor: {line: 1, character: 4}
30+
active: {line: 1, character: 4}

packages/cursorless-vscode-e2e/suite/fixtures/recorded/languages/perl/chuckItem.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ initialState:
1616
two => 2,
1717
);
1818
selections:
19-
- anchor: {line: 2, character: 4}
20-
active: {line: 2, character: 4}
19+
- anchor: {line: 1, character: 8}
20+
active: {line: 1, character: 8}
2121
marks: {}
2222
finalState:
2323
documentContents: |-
2424
%hash = (
2525
two => 2,
2626
);
2727
selections:
28-
- anchor: {line: 2, character: 4}
29-
active: {line: 2, character: 4}
28+
- anchor: {line: 1, character: 4}
29+
active: {line: 1, character: 4}

0 commit comments

Comments
 (0)