Skip to content

Commit

Permalink
fix: correctly expand selections containing arrow functions
Browse files Browse the repository at this point in the history
  • Loading branch information
1nVitr0 committed Jan 8, 2024
1 parent 82048de commit 423a3f6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"outFiles": ["${workspaceFolder}/out/test/**/*.js"],
"preLaunchTask": "npm: watch"
"preLaunchTask": "npm: test-watch"
}
]
}
2 changes: 1 addition & 1 deletion src/providers/ConfigurationProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const defaultFoldingMarkers: FoldingMarkerList<FoldingMarkerDefault> = {
"()": { start: "\\(", end: "\\)" },
"[]": { start: "\\[", end: "\\]" },
"{}": { start: "\\{", end: "\\}" },
"<>": { start: "<", end: ">" },
"<>": { start: "<", end: "(?<!\\=)>" },
};

const defaultCompleteBlockMarkers = ["\\}", "<\\/[a-zA-Z0-9\\-_=\\s]+"];
Expand Down
2 changes: 1 addition & 1 deletion src/test/fixtures/expand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const expandTests: RangeTest[] = [
{
file: "expand.typescript.fixture",
ranges: [new Range(3, 9, 3, 9), new Range(22, 0, 24, 0), new Range(30, 2, 30, 2)],
targetRanges: [new Range(3, 0, 16, 20), new Range(22, 0, 26, 3), new Range(30, 0, 36, 63)],
targetRanges: [new Range(3, 0, 16, 20), new Range(22, 0, 26, 3), new Range(30, 0, 36, 62)],
},
{
file: "expand.cpp.fixture",
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/expand.typescript.fixture
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ class Test2 {
arrowFunction: () => {
return 2
},
functionCall: myFunction({ object: (t: unknown) => 'prop' }),
functionCall: myFunction({ object: (t: unknown) => 'prop' })
}

0 comments on commit 423a3f6

Please sign in to comment.