mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
Override isHidden for the CursorView
We know it's visible if it is on the dom and doesn't have display == none set. This is an order of magnitude faster than the default implementation which calls getComputedStyle()
This commit is contained in:
@@ -54,6 +54,14 @@ class CursorView extends View
|
||||
|
||||
@setVisible(@cursor.isVisible() and not @editor.isFoldedAtScreenRow(screenPosition.row))
|
||||
|
||||
# Override for speed. The base function checks the computedStyle
|
||||
isHidden: ->
|
||||
style = this[0].style
|
||||
if style.display == 'none' or not @isOnDom()
|
||||
true
|
||||
else
|
||||
false
|
||||
|
||||
needsAutoscroll: ->
|
||||
@cursor.needsAutoscroll
|
||||
|
||||
|
||||
Reference in New Issue
Block a user