Skip to content

Commit 01a126e

Browse files
XuechunHHHimykhai
authored andcommitted
run prettier
1 parent 5e52c2d commit 01a126e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

server/aws-lsp-partiql/src/server/completion-hint/parser-completion.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function symbolAtCaretPosition(parseTree: TerminalNode, caretPosition: { line: n
5353
const stop = start + (parseTree.symbol.text?.length ?? 0)
5454

5555
return (
56-
parseTree.symbol.line == caretPosition.line + 1 &&
56+
parseTree.symbol.line == caretPosition.line &&
5757
start <= caretPosition.character &&
5858
stop > caretPosition.character
5959
)
@@ -125,7 +125,7 @@ function getPosition(
125125
const substring = line.substring(0, position.character)
126126
const lastSpaceIndex = substring.lastIndexOf(' ')
127127
return {
128-
line: position.line,
128+
line: position.line + 1, // change to 1-indexed line number
129129
character: lastSpaceIndex + 1,
130130
}
131131
}

server/aws-lsp-partiql/src/server/language-service.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -964,4 +964,4 @@ describe('PartiQL Completion Hint testing', () => {
964964
expect(suggestions!.items).toEqual(expect.arrayContaining([testData.expectedOutput!.items[0]]))
965965
})
966966
})
967-
})
967+
})

0 commit comments

Comments
 (0)