rem: gSearchSession.addScopeTerm(nsMsgSearchScope.offlineMail, selectedFolder); 
add: var ioService = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService);  gSearchSession.addScopeTerm(gSearchInput.searchMode == kQuickSearchBody && !ioService.offline ? nsMsgSearchScope.onlineMail : nsMsgSearchScope.offlineMail, selectedFolder); 
context: function createSearchTermsWithList(aTermsArray){  var nsMsgSearchScope = Components.interfaces.nsMsgSearchScope;  var nsMsgSearchAttrib = Components.interfaces.nsMsgSearchAttrib;  var nsMsgSearchOp = Components.interfaces.nsMsgSearchOp;  gSearchSession.clearScopes();  var searchTerms = gSearchSession.searchTerms;  var searchTermsArray = searchTerms.QueryInterface(Components.interfaces.nsISupportsArray);  searchTermsArray.Clear();  var selectedFolder = GetThreadPaneFolder();  gSearchSession.addScopeTerm(nsMsgSearchScope.offlineMail, selectedFolder);  // add each item in termsArray to the search session  var termsArray = aTermsArray.QueryInterface(Components.interfaces.nsISupportsArray);  for (var i = 0; i < termsArray.Count(); i++)    gSearchSession.appendTerm(termsArray.GetElementAt(i).QueryInterface(Components.interfaces.nsIMsgSearchTerm));}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/c8d5f0018a72b4a1986c3645dbd3a14e311596e9/searchBar.js/buggy/mail/base/content/searchBar.js