mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-13 08:44:12 +03:00
Only update gutter when editor is attached
This commit is contained in:
parent
54a3823606
commit
91aebde968
@ -406,12 +406,13 @@ class Editor extends View
|
||||
handleRendererChange: (e) ->
|
||||
oldScreenRange = e.oldRange
|
||||
newScreenRange = e.newRange
|
||||
unless newScreenRange.isSingleLine() and newScreenRange.coversSameRows(oldScreenRange)
|
||||
@gutter.renderLineNumbers(@getFirstVisibleScreenRow(), @getLastVisibleScreenRow())
|
||||
|
||||
@compositeCursor.updateBufferPosition() unless e.bufferChanged
|
||||
|
||||
if @attached
|
||||
unless newScreenRange.isSingleLine() and newScreenRange.coversSameRows(oldScreenRange)
|
||||
@gutter.renderLineNumbers(@getFirstVisibleScreenRow(), @getLastVisibleScreenRow())
|
||||
|
||||
lineElements = @buildLineElements(newScreenRange.start.row, newScreenRange.end.row)
|
||||
@replaceLineElements(oldScreenRange.start.row, oldScreenRange.end.row, lineElements)
|
||||
@verticalScrollbarContent.height(@lineHeight * @screenLineCount())
|
||||
|
Loading…
Reference in New Issue
Block a user