rem: else { outlinerSelection.clearSelection(); /* clear selection in either case  */ setTitleFromFolder(folder,null); ClearMessagePane(); } 
context: function HandleDeleteOrMoveMsgCompleted(folder){  gDBView.onDeleteCompleted(true);  if (gNextMessageViewIndexAfterDelete != -2)   {    if (IsCurrentLoadedFolder(folder))     {      var outlinerView = gDBView.QueryInterface(Components.interfaces.nsIOutlinerView);      var outlinerSelection = outlinerView.selection;      if (gNextMessageViewIndexAfterDelete != -1)       {        viewSize = outlinerView.rowCount;        if (gNextMessageViewIndexAfterDelete >= viewSize)         {          if (viewSize > 0)            gNextMessageViewIndexAfterDelete = viewSize - 1;          else            gNextMessageViewIndexAfterDelete = -1;        }      }      // if we are about to set the selection with a new element then DON'T clear      // the selection then add the next message to select. This just generates      // an extra round of command updating notifications that we are trying to      // optimize away.      if (gNextMessageViewIndexAfterDelete != -1)       {        // when deleting a message we don't update the commands when the selection goes to 0        // (we have a hack in nsMsgDBView which prevents that update) so there is no need to        // update commands when we select the next message after the delete; the commands already        // have the right update state...        gDBView.suppressCommandUpdating = true;        outlinerSelection.select(gNextMessageViewIndexAfterDelete);                // if gNextMessageViewIndexAfterDelete has the same value         // as the last index we had selected, the outliner won't generate a        // selectionChanged notification for the outliner view. So force a manual        // selection changed call. (don't worry it's cheap if we end up calling it twice).        if (outlinerView)          outlinerView.selectionChanged();        EnsureRowInThreadOutlinerIsVisible(gNextMessageViewIndexAfterDelete);         gDBView.suppressCommandUpdating = false;      }      else       {        outlinerSelection.clearSelection(); /* clear selection in either case  */        setTitleFromFolder(folder,null);        ClearMessagePane();      }    }      gNextMessageViewIndexAfterDelete = -2;       //default value after delete/move/copy is over  }}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/82bb95931f52af4e0268a26e4bcb0f31cf8b0d2a/msgMail3PaneWindow.js/clean/mailnews/base/resources/content/msgMail3PaneWindow.js