Skip to content

Commit

Permalink
Center match when scrolling to the next search result
Browse files Browse the repository at this point in the history
  • Loading branch information
oggy committed Feb 17, 2019
1 parent 9d76123 commit 2c9401e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/search-manager.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ class SearchManager
emacsCursor.cursor.setBufferPosition(marker.getStartBufferPosition())
markers.push(marker)

pos = @emacsEditor.editor.getCursors()[0].getBufferPosition()
@emacsEditor.editor.scrollToBufferPosition(pos, center: true)
@results.setCurrent(markers)
@_updateSearchView()

Expand Down

0 comments on commit 2c9401e

Please sign in to comment.