Skip to content

Commit

Permalink
fix: shiki highlight jumping
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed May 2, 2024
1 parent 03bc7b1 commit 919c4c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/ui/code-highlighter/shiki/ShikiWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const ShikiHighLighterWrapper = forwardRef<
$hightlighted,
)

$el.scrollTop = lineHeight * childIndexInParent - 30
$el.scrollTop = lineHeight * childIndexInParent - $el.clientHeight / 2
}
} else {
setIsOverflow(false)
Expand Down

0 comments on commit 919c4c1

Please sign in to comment.