From c0d333629efe0eba235f62d47578a73c7821c385 Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Wed, 2 Jan 2008 17:22:19 +0000 Subject: [PATCH] simple fix, that we don't echo message while not in the main thread. This fixes :set editor=unknown_editor to not hang firefox --- content/ui.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/content/ui.js b/content/ui.js index 2c56085a..d1be2bb6 100644 --- a/content/ui.js +++ b/content/ui.js @@ -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;