renderer tells editor when the gutter needs to be updated

This commit is contained in:
Corey Johnson & Nathan Sobo
2012-05-24 11:17:37 -07:00
parent c1197c1d0e
commit 9b83ce6545
5 changed files with 50 additions and 11 deletions

View File

@@ -424,7 +424,7 @@ class Editor extends View
@compositeCursor.updateBufferPosition() unless e.bufferChanged
if @attached
unless newScreenRange.isSingleLine() and newScreenRange.coversSameRows(oldScreenRange)
if e.lineNumbersChanged
@gutter.renderLineNumbers(@getFirstVisibleScreenRow(), @getLastVisibleScreenRow())
@verticalScrollbarContent.height(@lineHeight * @screenLineCount())
@@ -454,7 +454,7 @@ class Editor extends View
if rowDelta > 0
@removeLineElements(@lastRenderedScreenRow + 1, @lastRenderedScreenRow + rowDelta)
else
else if rowDelta < 0
@lastRenderedScreenRow += rowDelta
@updateVisibleLines()