Skip to content

Commit

Permalink
misc: fix format, bump prerelease to 0.5.14002
Browse files Browse the repository at this point in the history
  • Loading branch information
71 committed Dec 2, 2023
1 parent 21a8b2e commit 822dc5b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const selectionDecorationType = {
// ============================================================================

const version = "0.5.14",
preRelease = 1;
preRelease = 2;

export const pkg = (modules: Builder.ParsedModule[]) => ({

Expand Down
4 changes: 2 additions & 2 deletions package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions src/commands/seek.ts
Original file line number Diff line number Diff line change
Expand Up @@ -509,12 +509,12 @@ export async function object(

// Languages with queries available are a subset of supported languages, so
// given that we have a `query` `withDocumentTree()` will not fail.
const newSelections = await treeSitter.withDocumentTree(_.document, async (documentTree) => {
const newSelections = await treeSitter.withDocumentTree(_.document, (documentTree) => {
const textObjectName = match![1] + (inner ? ".inside" : ".around");

if (!query.captureNames.includes(textObjectName)) {
const existingValues = query.captureNames.map((name) =>
`"${name.replace(".inside", "").replace(".around", "")}"`
`"${name.replace(".inside", "").replace(".around", "")}"`,
).join(", ");

throw new Error(
Expand All @@ -532,7 +532,7 @@ export async function object(
const active = selection.active;

let smallestNode: SyntaxNode | undefined;
let smallestNodeLength: number = Number.MAX_SAFE_INTEGER;
const smallestNodeLength = Number.MAX_SAFE_INTEGER;

for (const [node, nodeRange] of captures) {
if (!nodeRange.contains(active)) {
Expand All @@ -549,9 +549,9 @@ export async function object(
return smallestNode === undefined
? selection
: Selections.fromStartEnd(
treeSitter.toPosition(smallestNode.startPosition),
treeSitter.toPosition(smallestNode.endPosition),
Selections.isStrictlyReversed(selection, _));
treeSitter.toPosition(smallestNode.startPosition),
treeSitter.toPosition(smallestNode.endPosition),
Selections.isStrictlyReversed(selection, _));
});
});

Expand Down

0 comments on commit 822dc5b

Please sign in to comment.