mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-24 19:59:53 -04:00
Fixed comment gutter icons jumping all over the place.
This commit is contained in:
parent
d6178aa2cc
commit
656b34fc34
1 changed files with 2 additions and 0 deletions
|
@ -518,8 +518,10 @@ module.exports = class SpellView extends View
|
||||||
highlightComments: ->
|
highlightComments: ->
|
||||||
lines = $(@ace.container).find('.ace_text-layer .ace_line_group')
|
lines = $(@ace.container).find('.ace_text-layer .ace_line_group')
|
||||||
session = @aceSession
|
session = @aceSession
|
||||||
|
top = Math.floor @ace.renderer.getScrollTopRow()
|
||||||
$(@ace.container).find('.ace_gutter-cell').each (index, el) ->
|
$(@ace.container).find('.ace_gutter-cell').each (index, el) ->
|
||||||
line = $(lines[index])
|
line = $(lines[index])
|
||||||
|
index = index - top
|
||||||
session.removeGutterDecoration index, 'comment-line'
|
session.removeGutterDecoration index, 'comment-line'
|
||||||
if line.find('.ace_comment').length
|
if line.find('.ace_comment').length
|
||||||
session.addGutterDecoration index, 'comment-line'
|
session.addGutterDecoration index, 'comment-line'
|
||||||
|
|
Loading…
Add table
Reference in a new issue