Only show wrap guide when enough space

Previously the wrap guide would cause the
editor to scroll if the editor was narrower
than the wrap guide column without taking into
account whether any lines actually reach the guide.

Now the wrap guide only displays when either the wrap
guide column is less than the minimum width of the
editor layer or if the wrap guide column is less than
the entire width of the editor.
This commit is contained in:
Kevin Sawicki
2012-12-26 12:48:38 -08:00
parent ab407a297a
commit a9b9c09a86
3 changed files with 25 additions and 9 deletions

View File

@@ -759,6 +759,7 @@ class Editor extends View
@underlayer.css('min-width', minWidth)
@overlayer.css('min-width', minWidth)
@layerMinWidth = minWidth
@trigger 'editor:min-width-changed'
clearRenderedLines: ->
@renderedLines.empty()