mirror of
https://github.com/atom/atom.git
synced 2026-02-16 01:25:13 -05:00
Reset scrollLeft when setSoftWrapColumn is called
When the scroll view is scrolled and overflow-x is set to 'hidden' the scroll view renders wrong. Setting scrollLeft to 0 fixes this problem. I'm unhappy with this solution, but it was a simple way to get the scroll view to update its layout. Closes #137
This commit is contained in:
@@ -590,6 +590,7 @@ class Editor extends View
|
||||
@setSoftWrapColumn(softWrapColumn) if @attached
|
||||
if @activeEditSession.getSoftWrap()
|
||||
@addClass 'soft-wrap'
|
||||
@scrollView.scrollLeft(0)
|
||||
@_setSoftWrapColumn = => @setSoftWrapColumn()
|
||||
$(window).on "resize.editor-#{@id}", @_setSoftWrapColumn
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user