Fixed comment gutter icons jumping all over the place.

This commit is contained in:
Nick Winter 2014-03-23 16:00:23 -07:00
parent d6178aa2cc
commit 656b34fc34

View file

@ -518,8 +518,10 @@ module.exports = class SpellView extends View
highlightComments: ->
lines = $(@ace.container).find('.ace_text-layer .ace_line_group')
session = @aceSession
top = Math.floor @ace.renderer.getScrollTopRow()
$(@ace.container).find('.ace_gutter-cell').each (index, el) ->
line = $(lines[index])
index = index - top
session.removeGutterDecoration index, 'comment-line'
if line.find('.ace_comment').length
session.addGutterDecoration index, 'comment-line'