1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 06:17:58 +01:00

simple fix, that we don't echo message while not in the main thread. This fixes :set editor=unknown_editor to not hang firefox

This commit is contained in:
Martin Stubenschrott
2008-01-02 17:22:19 +00:00
parent 78527f8d95
commit c0d333629e

View File

@@ -305,6 +305,12 @@ vimperator.CommandLine = function () //{{{
// vimperator.echo uses different order of flags as it omits the hightlight group, change v.commandline.echo argument order? --mst
echo: function (str, highlightGroup, flags)
{
// if we are modifing the GUI while we are not in the main thread
// Firefox will hang up
var threadManager = Cc["@mozilla.org/thread-manager;1"].getService(Ci.nsIThreadManager);
if (!threadManager.isMainThread)
return false;
var focused = document.commandDispatcher.focusedElement;
if (focused && focused == commandWidget.inputField || focused == multilineInputWidget.inputField)
return false;