Selection rendering accounts for the presence of gutter

This commit is contained in:
Nathan Sobo
2012-03-05 11:17:46 -07:00
parent 5a4f4955b2
commit 95db96b238
2 changed files with 10 additions and 12 deletions

View File

@@ -43,12 +43,10 @@ class Selection extends View
appendRegion: (rows, start, end) ->
{ lineHeight, charWidth } = @editor
css = {}
css.top = start.row * lineHeight
css.left = start.column * charWidth
css = @editor.pixelPositionForScreenPosition(start)
css.height = lineHeight * rows
if end
css.width = end.column * charWidth - css.left
css.width = @editor.pixelPositionForScreenPosition(end).left - css.left
else
css.right = 0