rem: SelectNextMessage(nextMessage); 
add: gNextMessageAfterDelete = nextMessage.getAttribute('id'); 
context: function MsgDeleteMessage(fromToolbar){  //dump("\nMsgDeleteMessage from XUL\n");  //dump("from toolbar? " + fromToolbar + "\n");  var tree = GetThreadTree();  if(tree) {	var srcFolder = GetThreadTreeFolder();	// if from the toolbar, return right away if this is a news message	// only allow cancel from the menu:  "Edit | Cancel / Delete Message"	if (fromToolbar) {		uri = srcFolder.getAttribute('ref');		//dump("uri[0:6]=" + uri.substring(0,6) + "\n");		if (uri.substring(0,6) == "news:/") {			//dump("delete ignored!\n");			return;		}	}	dump("tree is valid\n");	//get the selected elements	var messageList = ConvertDOMListToResourceArray(tree.selectedItems);    	var nextMessage = GetNextMessageAfterDelete(tree.selectedItems);	//get the current folder	messenger.DeleteMessages(tree.database, srcFolder.resource, messageList);	SelectNextMessage(nextMessage);  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/10f1f6ee3049cf89dc5b6f7031008e46b685be23/widgetglue.js/buggy/mailnews/base/resources/content/widgetglue.js