mirror of
https://github.com/atom/atom.git
synced 2026-02-11 07:05:11 -05:00
Temporary fix: When editor is resized, adjust width of rendered lines.
We do this to ensure that the lines aren't longer than the scroll view if they don't have to be. We really should use min-width instead because it's automatic. Also, trigger window resize when we make the editor narrower.
This commit is contained in:
@@ -337,7 +337,9 @@ class Editor extends View
|
||||
@calculateDimensions()
|
||||
@hiddenInput.width(@charWidth)
|
||||
@setSoftWrapColumn() if @activeEditSession.getSoftWrap()
|
||||
$(window).on "resize.editor#{@id}", => @updateRenderedLines()
|
||||
$(window).on "resize.editor#{@id}", =>
|
||||
@updateRenderedLines()
|
||||
@adjustWidthOfRenderedLines() # TODO: This should happen automatically with CSS
|
||||
@focus() if @isFocused
|
||||
|
||||
@renderWhenAttached()
|
||||
|
||||
Reference in New Issue
Block a user