Desktop: Scroll linked-to headers to the top of the editor

pull/12125/head
Henry Heino 2025-04-17 08:45:18 -07:00
parent 6d3c3a80ab
commit 4347d10dcd
1 changed files with 3 additions and 1 deletions

View File

@ -72,7 +72,9 @@ const jumpToHash = (view: EditorView, hash: string) => {
if (targetLocation !== undefined) {
view.dispatch({
selection: EditorSelection.cursor(targetLocation),
scrollIntoView: true,
effects: [
EditorView.scrollIntoView(targetLocation, { y: 'start' }),
],
});
return true;
}