From 00cb0bb8d93246da4a04fe4ea9db98b22bcf595c Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 25 Apr 2013 09:33:11 -0700 Subject: [PATCH] Don't require SpellChecker module until correction command is triggered --- src/packages/spell-check/lib/misspelling-view.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/packages/spell-check/lib/misspelling-view.coffee b/src/packages/spell-check/lib/misspelling-view.coffee index 0940ce0f7..b2afdf1ce 100644 --- a/src/packages/spell-check/lib/misspelling-view.coffee +++ b/src/packages/spell-check/lib/misspelling-view.coffee @@ -1,7 +1,6 @@ {View} = require 'space-pen' Range = require 'range' CorrectionsView = require './corrections-view' -SpellChecker = require 'spellchecker' module.exports = class MisspellingView extends View @@ -31,6 +30,7 @@ class MisspellingView extends View screenRange = @getScreenRange() misspelling = @editor.getTextInRange(@editor.bufferRangeForScreenRange(screenRange)) + SpellChecker = require 'spellchecker' corrections = SpellChecker.getCorrectionsForMisspelling(misspelling) @correctionsView?.remove() @correctionsView = new CorrectionsView(@editor, corrections, screenRange)