mirror of
https://github.com/atom/atom.git
synced 2026-01-24 22:38:20 -05:00
Fix auto-width
This commit is contained in:
committed by
Antonio Scandurra
parent
f58a249be1
commit
e6026a145c
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user