mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 10:08:00 +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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user