add: gSelectedIndexWhenDeleting = treeSelection.currentIndex; } 
context: function SetNextMessageAfterDelete(){  var treeSelection = GetThreadTree().view.selection;  if (treeSelection.isSelected(treeSelection.currentIndex))    gNextMessageViewIndexAfterDelete = gDBView.msgToSelectAfterDelete;  else if(gDBView.removeRowOnMoveOrDelete)  {    // Only set gThreadPaneDeleteOrMoveOccurred to true if the message was    // truly moved to the trash or deleted, as opposed to an IMAP delete    // (where it is only "marked as deleted".  This will prevent bug 142065.    //    // If it's an IMAP delete, then just set gNextMessageViewIndexAfterDelete    // to treeSelection.currentIndex (where the outline is at) because nothing    // was moved or deleted from the folder.    gThreadPaneDeleteOrMoveOccurred = true;    gNextMessageViewIndexAfterDelete = treeSelection.currentIndex - NumberOfSelectedMessagesAboveCurrentIndex(treeSelection.currentIndex);  }  else    gNextMessageViewIndexAfterDelete = treeSelection.currentIndex;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/ced82e46b0d3cc8518e5e71624fb72845c34150d/msgMail3PaneWindow.js/buggy/mail/base/content/msgMail3PaneWindow.js