mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
Base gutter updates on defaultCharWidth instead of fontSize/Family
This commit is contained in:
@@ -70,7 +70,7 @@ EditorComponent = React.createClass
|
||||
div className: className, style: {fontSize, lineHeight, fontFamily}, tabIndex: -1,
|
||||
GutterComponent {
|
||||
ref: 'gutter', editor, renderedRowRange, maxLineNumberDigits,
|
||||
scrollTop, scrollHeight, lineHeight, lineHeightInPixels, fontSize, fontFamily,
|
||||
scrollTop, scrollHeight, lineHeight, lineHeightInPixels, defaultCharWidth,
|
||||
@pendingChanges, onWidthChanged: @onGutterWidthChanged, mouseWheelScreenRow
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ GutterComponent = React.createClass
|
||||
# visible row range.
|
||||
shouldComponentUpdate: (newProps) ->
|
||||
return true unless isEqualForProperties(newProps, @props,
|
||||
'renderedRowRange', 'scrollTop', 'lineHeightInPixels', 'fontSize',
|
||||
'renderedRowRange', 'scrollTop', 'lineHeightInPixels', 'defaultCharWidth',
|
||||
'mouseWheelScreenRow'
|
||||
)
|
||||
|
||||
@@ -49,7 +49,7 @@ GutterComponent = React.createClass
|
||||
@updateDummyLineNumber()
|
||||
@removeLineNumberNodes()
|
||||
|
||||
@measureWidth() unless @lastMeasuredWidth? and isEqualForProperties(oldProps, @props, 'maxLineNumberDigits', 'fontSize', 'fontFamily')
|
||||
@measureWidth() unless @lastMeasuredWidth? and isEqualForProperties(oldProps, @props, 'maxLineNumberDigits', 'defaultCharWidth')
|
||||
@clearScreenRowCaches() unless oldProps.lineHeightInPixels is @props.lineHeightInPixels
|
||||
@updateLineNumbers()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user