Account for padding-left on the scroll view when soft-wrapping lines

Fixes #2844
This commit is contained in:
Nathan Sobo
2014-07-07 14:02:24 -06:00
parent 2de42303d4
commit fad2a63a14
2 changed files with 16 additions and 2 deletions

View File

@@ -767,6 +767,8 @@ EditorComponent = React.createClass
if position is 'absolute' or width
clientWidth = scrollViewNode.clientWidth
paddingLeft = parseInt(getComputedStyle(scrollViewNode).paddingLeft)
clientWidth -= paddingLeft
editor.setWidth(clientWidth) if clientWidth > 0
measureLineHeightAndCharWidthsIfNeeded: (prevState) ->