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:
Corey Johnson & Nathan Sobo
2012-07-13 17:16:53 -06:00
parent e15f2204c7
commit c7b7135388
3 changed files with 5 additions and 1 deletions

View File

@@ -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()