fix: json outline line index

This commit is contained in:
liyasthomas
2021-09-14 23:28:39 +05:30
parent 93a97a2f4c
commit 4a332f40e5

View File

@@ -219,7 +219,9 @@ const { cursor } = useCodemirror(
)
const jumpCursor = (ast: JSONValue | JSONObjectMember) => {
cursor.value = convertIndexToLineCh(jsonBodyText.value, ast.start)
const pos = convertIndexToLineCh(jsonBodyText.value, ast.start)
pos.line--
cursor.value = pos
}
const downloadResponse = () => {