Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit 9333acf

Browse files
committed
Merge pull request #5861 from lkcampbell/3063-fix
Automatically scroll find selection into view
2 parents fec46ea + 89b5c6b commit 9333acf

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/search/FindReplace.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ define(function (require, exports, module) {
143143
// no need to scroll if the line with the match is in view
144144
centerOptions = Editor.BOUNDARY_IGNORE_TOP;
145145
}
146+
cm.scrollIntoView({from: cursor.from(), to: cursor.to()});
146147
editor.setSelection(cursor.from(), cursor.to(), true, centerOptions);
147148
state.posFrom = cursor.from();
148149
state.posTo = cursor.to();

0 commit comments

Comments
 (0)