mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Don't update highlighted gutter lines unless the editor is alive
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user