diff --git a/Donators b/Donators index a9e991f4..4125fde0 100644 --- a/Donators +++ b/Donators @@ -2,6 +2,7 @@ Note: If you don't wish to appear on this list when making a donation, please tell me. 2008: +* Kashyap Paidimarri * Gabriel Gellner * Marco Candrian * Ovidiu Curcan diff --git a/content/events.js b/content/events.js index c15b317a..9aa24993 100644 --- a/content/events.js +++ b/content/events.js @@ -928,8 +928,8 @@ vimperator.Events = function () //{{{ if (vimperator.config.name == "Muttator") { // we switch to -- MESSAGE -- mode for muttator, when the main HTML widget gets focus - //if ((win && win.document && win.document instanceof HTMLDocument) || - if ((win && win == window.content) || elem instanceof HTMLAnchorElement) + if ((win && win.document && win.document instanceof HTMLDocument) + || elem instanceof HTMLAnchorElement) { if (vimperator.mode != vimperator.modes.MESSAGE) vimperator.mode = vimperator.modes.MESSAGE; diff --git a/content/mail.js b/content/mail.js index 7aee4030..5e888363 100644 --- a/content/mail.js +++ b/content/mail.js @@ -356,6 +356,7 @@ vimperator.Mail = function () // first try to find in current folder if (gDBView) { + //var curIndex = // FIXME: doesn't work with collapsed threads for (var i = gDBView.selection.currentIndex + (reverse ? -1 : 1); (reverse ? ( i >= 0) : (i < gDBView.rowCount)); reverse ? i-- : i++) @@ -390,10 +391,22 @@ vimperator.Mail = function () if (folder.isServer) continue; + selectMessageCount = count; selectMessageKeys = []; - var msgs = folder.getMessages(msgWindow); + // sometimes folder.getMessages can fail with an exception + // TODO: find out why, and solve the problem + try + { + var msgs = folder.getMessages(msgWindow); + } + catch (e) + { + dump("ERROR: " + folder.prettyName + " failed to getMessages\n"); + continue; + } + while (msgs.hasMoreElements()) { var msg = msgs.getNext().QueryInterface(Components.interfaces.nsIMsgDBHdr);