Fix auto-width

This commit is contained in:
Nathan Sobo
2017-03-18 20:08:08 -07:00
committed by Antonio Scandurra
parent f58a249be1
commit e6026a145c

View File

@@ -1537,6 +1537,8 @@ class TextEditorComponent {
getContentWidth () {
if (this.props.model.isSoftWrapped()) {
return this.getClientWidth() - this.getGutterContainerWidth()
} else if (this.props.model.getAutoWidth()) {
return Math.round(this.measurements.longestLineWidth + this.measurements.baseCharacterWidth)
} else {
return Math.max(
Math.round(this.measurements.longestLineWidth + this.measurements.baseCharacterWidth),