Make lines extend across the entire width of the scroller

This ensures line decorations render properly, even when the content is
narrower than the editor.
This commit is contained in:
Nathan Sobo
2017-03-15 20:35:25 -06:00
committed by Antonio Scandurra
parent 5c7208751f
commit 1427dbf540
2 changed files with 14 additions and 2 deletions

View File

@@ -1496,7 +1496,10 @@ class TextEditorComponent {
if (this.getModel().isSoftWrapped()) {
return this.getClientWidth() - this.getGutterContainerWidth()
} else {
return Math.round(this.measurements.longestLineWidth + this.measurements.baseCharacterWidth)
return Math.max(
Math.round(this.measurements.longestLineWidth + this.measurements.baseCharacterWidth),
this.measurements.scrollerWidth - this.getGutterContainerWidth()
)
}
}