Comments that were entered in a section of code that is folded are not visible, even when expanding that section

Review Request #1492 — Created March 29, 2010 and submitted

Information

Review Board

Reviewers

1. Have a diffset with at least 2 files
2. Expand a section in the first file
3. Add a comment on one of the previously hidden lines, publish
4. Reload the page, the expanding section is now collapsed
5. Expand the section again.  The comment is not visible.

The comment is visible only is you use the expand all button.

The issue is in diffviewer.js,  function addCommentFlags(table, lines)
	gHiddenComments = remaining;
addCommentFlags is called for each file, so gHiddenComments is overwritten 
by the last file.
Reproduced the issue on local server.  Verified the fix on a set of 3 files, having "hidden" comments in the second file.  Verified it on a larger set of files, with comments in different hidden sections.
david
  1. Looks good. Pushed to master as 417cede.
  2.