mirror of
https://github.com/atom/atom.git
synced 2026-02-07 21:25:05 -05:00
Hide the cursor when it is on a fold line
This commit is contained in:
@@ -177,4 +177,9 @@ class Cursor extends View
|
||||
if this == _.last(@editor.getCursors())
|
||||
@editor.scrollTo(pixelPosition)
|
||||
|
||||
if @editor.isFoldedAtScreenRow(screenPosition.row)
|
||||
@hide()
|
||||
else
|
||||
@show()
|
||||
|
||||
@selection.updateAppearance()
|
||||
|
||||
@@ -343,7 +343,6 @@ class Editor extends View
|
||||
screenRow = @firstRenderedScreenRow + i
|
||||
element = @lineElementForScreenRow(screenRow)
|
||||
if @compositeSelection.intersectsBufferRange(fold.getBufferRange())
|
||||
|
||||
element.addClass('selected')
|
||||
else
|
||||
element.removeClass('selected')
|
||||
@@ -363,6 +362,9 @@ class Editor extends View
|
||||
getLastScreenRow: ->
|
||||
@screenLineCount() - 1
|
||||
|
||||
isFoldedAtScreenRow: (screenRow) ->
|
||||
@screenLineForRow(screenRow).fold?
|
||||
|
||||
destroyFoldsContainingBufferRow: (bufferRow) ->
|
||||
@renderer.destroyFoldsContainingBufferRow(bufferRow)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user