diff --git a/content/events.js b/content/events.js index 36b846ea..6aae9b72 100644 --- a/content/events.js +++ b/content/events.js @@ -716,7 +716,7 @@ function Events() //{{{ "List all macros", function (args) { completion.listCompleter("macro", args[0]) }, { - argCount: "1", + argCount: "?", completer: function (context) completion.macro(context), }); diff --git a/content/liberator.js b/content/liberator.js index f97d51fe..15a8bd9f 100644 --- a/content/liberator.js +++ b/content/liberator.js @@ -830,6 +830,7 @@ const liberator = (function () //{{{ if (window != ww.activeWindow) return; + let elem = config.mainWidget || window.content; // TODO: make more generic try { @@ -840,16 +841,15 @@ const liberator = (function () //{{{ i = 0; gDBView.selection.select(i); } + + if (this.has("tabs")) + { + let frame = tabs.localStore.focusedFrame; + if (frame && frame.top == window.content) + elem = frame; + } } catch (e) {} - - let elem = config.mainWidget || window.content; - if (this.has("tabs")) - { - let frame = tabs.localStore.focusedFrame; - if (frame && frame.top == window.content) - elem = frame; - } if (clearFocusedElement && document.commandDispatcher.focusedElement) document.commandDispatcher.focusedElement.blur(); if (elem && (elem != document.commandDispatcher.focusedElement))