rem: gDownloadsView.selectedIndex = newIndex; 
add: gDownloadsView.selectedIndex = Math.min(index, gDownloadsView.itemCount - 1); 
context: function removeDownload(aDownload){  gDownloadManager.removeDownload(aDownload.getAttribute("dlid"));  var newIndex = Math.max(gDownloadsView.selectedIndex - 1, 0);  gDownloadsView.removeChild(aDownload);  gDownloadsView.selectedIndex = newIndex;}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/10234/4f03fee41691a2b52fd33955e3ef13741a4ec0bd/downloads.js/clean/toolkit/mozapps/downloads/content/downloads.js