Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Avoid config calls at package load time
Browse files Browse the repository at this point in the history
Refs #829
  • Loading branch information
maxbrunsfeld committed Jan 5, 2017
1 parent a254d94 commit c4de309
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/find.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ ProjectFindView = require './project-find-view'
ResultsModel = require './project/results-model'
ResultsPaneView = require './project/results-pane'

# Convert old config setting for backward compatibility.
if atom.config.get('find-and-replace.openProjectFindResultsInRightPane')
atom.config.set('find-and-replace.projectSearchResultsPaneSplitDirection', 'right')
atom.config.unset('find-and-replace.openProjectFindResultsInRightPane')

module.exports =
activate: ({findOptions, findHistory, replaceHistory, pathsHistory}={}) ->
# Convert old config setting for backward compatibility.
if atom.config.get('find-and-replace.openProjectFindResultsInRightPane')
atom.config.set('find-and-replace.projectSearchResultsPaneSplitDirection', 'right')
atom.config.unset('find-and-replace.openProjectFindResultsInRightPane')

atom.workspace.addOpener (filePath) ->
new ResultsPaneView() if filePath is ResultsPaneView.URI

Expand Down

0 comments on commit c4de309

Please sign in to comment.