fix: autocompletion position messing up
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { convertIndexToLineCh } from "../utils"
|
||||
import { Completer, CompletionEntry } from "."
|
||||
import { getTestScriptCompletions } from "~/helpers/tern"
|
||||
|
||||
@@ -9,9 +8,6 @@ export const completer: Completer = async (text, completePos) => {
|
||||
completePos.ch
|
||||
)
|
||||
|
||||
const start = convertIndexToLineCh(text, results.start)
|
||||
const end = convertIndexToLineCh(text, results.end)
|
||||
|
||||
const completions = results.completions.map((completion: any, i: number) => {
|
||||
return <CompletionEntry>{
|
||||
text: completion.name,
|
||||
@@ -21,8 +17,6 @@ export const completer: Completer = async (text, completePos) => {
|
||||
})
|
||||
|
||||
return {
|
||||
start,
|
||||
end,
|
||||
completions,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user