Skip to content

Commit 3175e6b

Browse files
committed
Fix item in hash not selecting both key and value
1 parent 580f55d commit 3175e6b

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

packages/cursorless-engine/src/languages/perl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const nodeMatchers: Partial<
3434
anonymousFunction: "anonymous_function",
3535
regularExpression: ["regex_pattern", "regex_pattern_qr"],
3636
collectionKey: "*[key]", // TODO: child of "value: hash?"
37-
collectionItem: "*[value]", // TODO: child of "value: hash?"
37+
collectionItem: "hash[variable]",
3838
argumentOrParameter: [
3939
"empty_parenthesized_argument",
4040
"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)