From 656b34fc34ad22c9114c3cfa24f039320e868e66 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Sun, 23 Mar 2014 16:00:23 -0700 Subject: [PATCH] Fixed comment gutter icons jumping all over the place. --- app/views/play/level/tome/spell_view.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/play/level/tome/spell_view.coffee b/app/views/play/level/tome/spell_view.coffee index e9ac98dab..4b08efaac 100644 --- a/app/views/play/level/tome/spell_view.coffee +++ b/app/views/play/level/tome/spell_view.coffee @@ -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'