anchor.diff:      });
     }
   
  +  var lastRow = null;
  +  var lastTarget = null;
  +  function showPopover(e) {
  +    var target  = e.domEvent.target;
  +    var row = e.getDocumentPosition().row;
  +
  +    if (target.className.indexOf('ace_gutter-cell') === -1 || lastRow === row) {
  +      return;
  +    }
  +    if (lastTarget === target) {
  +      // sometimes the row gets updated before the DOM event target, so we need to wait for it to change
  +      return;
  +    }
  +    lastRow = row;
  +
  +    var editor = e.editor;
  +    var comments = getCommentsForRow(editor, row);
  +    buildPopover(comments, $(target));
  +    lastTarget = target;
  +
  +    $(target).popover('show');
  +    $(target).on('mouseleave', function () {
  +      $(this).off('mouseleave');
  +      $(this).popover('destroy');
  +    });
  +  }
  +
  +  $('.ace_gutter').on('mouseleave', function () {
  +    lastRow = null;
  +    lastTarget = null;
  +  });
  +
     function handleSidebarClick(e) {
       var target  = e.domEvent.target;
  +    if (target.className.indexOf('ace_gutter-cell') === -1) return;
  +
       var editor =  e.editor;
       var fileid = $(editor.container).data('file-id');
  -
  -    if (target.className.indexOf("ace_gutter-cell") == -1) return;
   
       var row = e.getDocumentPosition().row;
       e.stop();
  
positive.code:     });
  
      jqrequest.done(function(response){
        editor.commentVisualsByLine = {};
        var clusters = clusterComments(response.slice());
        $.each(clusters, function (line, cluster) {
          editor.commentVisualsByLine[line] = generateCommentHtmlContent(cluster);
          buildPopover(fileid, line, cluster);
        });
  
        $.each(response, function(index, comment) {
          comment.className = 'code-ocean_comment';
        });
        session.setAnnotations(response);
      })
    }
  
    function deleteComment(commentId, editor, file_id, callback) {
      cleanupPopovers();
      var jqxhr = $.ajax({
        type: 'DELETE',
        url: "/comments/" + commentId
  
negative.code:       method: 'POST',
        url:  "/comments"
      });
      jqxhr.done(function(){
        setAnnotations(editor, file_id);
      });
      jqxhr.fail(ajaxError);
  