Skip to content

Commit

Permalink
fix: scroll the current search result into view
Browse files Browse the repository at this point in the history
  • Loading branch information
jczhong84 committed Dec 3, 2024
1 parent 7ffd12c commit 1baf7cb
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export const useSearchExtension = ({
if (shouldHighlight) {
editorView?.dispatch({
selection: EditorSelection.single(item.from, item.to),
effects: EditorView.scrollIntoView(item.from),
});
} else {
editorView?.dispatch({
Expand Down

0 comments on commit 1baf7cb

Please sign in to comment.