Skip to content

Commit

Permalink
fix: scroll the current search result into view (#1524)
Browse files Browse the repository at this point in the history
  • Loading branch information
jczhong84 authored Dec 4, 2024
1 parent 7ffd12c commit 48bcb34
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 48bcb34

Please sign in to comment.