Fix scrolling of jumpToOrigin

This commit is contained in:
Quinten Kock 2026-05-09 12:57:10 +02:00
parent 1891241d0a
commit 44159c63d1
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ function jumpToOrigin(view: EditorView, type: { get: typeof getDefinition, capab
: plugin.fromPosition(loc.range.start, target.view.state.doc); : plugin.fromPosition(loc.range.start, target.view.state.doc);
target.view.dispatch({ target.view.dispatch({
selection: {anchor: pos}, selection: {anchor: pos},
scrollIntoView: true, effects: EditorView.scrollIntoView(pos, {y: "start"}),
userEvent: "select.definition", userEvent: "select.definition",
}); });
setTimeout(() => target.focus(), 0); setTimeout(() => target.focus(), 0);