Don't update highlighted gutter lines unless the editor is alive

This commit is contained in:
Nathan Sobo
2014-01-10 17:56:04 -07:00
parent 72fe586101
commit 578ca8b197
2 changed files with 4 additions and 0 deletions

View File

@@ -217,6 +217,8 @@ class EditorView extends View
do (name, method) =>
@command name, (e) => method.call(this, e); false
isAlive: -> @editor?.isAlive()
# {Delegates to: Editor.getCursor}
getCursor: -> @editor.getCursor()

View File

@@ -230,6 +230,8 @@ class Gutter extends View
@highlightedLineNumbers.push(highlightedLineNumber)
highlightLines: ->
return unless @getEditorView().isAlive()
if @getEditorView().getSelection().isEmpty()
row = @getEditorView().getCursorScreenPosition().row
rowRange = new Range([row, 0], [row, 0])