diff --git a/src/packages/spell-check/lib/corrections-view.coffee b/src/packages/spell-check/lib/corrections-view.coffee index b0041a8c9..c752263eb 100644 --- a/src/packages/spell-check/lib/corrections-view.coffee +++ b/src/packages/spell-check/lib/corrections-view.coffee @@ -39,15 +39,18 @@ class CorrectionsView extends SelectList attach: -> @aboveCursor = false - if @corrections.length > 0 - @setArray(@corrections) - else - @setError("No corrections found") + @setArray(@corrections) @editor.appendToLinesView(this) @setPosition() @miniEditor.focus() + getEmptyMessage: (itemCount) -> + if itemCount is 0 + 'No corrections' + else + super + detach: -> super diff --git a/src/packages/spell-check/spec/spell-check-spec.coffee b/src/packages/spell-check/spec/spell-check-spec.coffee index d12e9ab7a..7ce61f108 100644 --- a/src/packages/spell-check/spec/spell-check-spec.coffee +++ b/src/packages/spell-check/spec/spell-check-spec.coffee @@ -97,7 +97,7 @@ describe "Spell check", -> editor.trigger 'editor:correct-misspelling' expect(editor.find('.corrections').length).toBe 1 expect(editor.find('.corrections li').length).toBe 0 - expect(editor.find('.corrections .error').text()).toBe "No corrections found" + expect(editor.find('.corrections').view().error.text()).toBe "No corrections" describe "when the edit session is destroyed", -> it "destroys all misspelling markers", ->