mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-14 17:05:47 +01:00
Fix displaying the labels of our sidebar entries in :sbar completion before the menu has been opened.
This commit is contained in:
@@ -1053,14 +1053,14 @@ function iter(obj) {
|
|||||||
let args = arguments;
|
let args = arguments;
|
||||||
let res = Iterator(obj);
|
let res = Iterator(obj);
|
||||||
|
|
||||||
if (isinstance(args, ["Iterator", "Generator"]))
|
if (args.length > 1)
|
||||||
;
|
|
||||||
else if (args.length > 1)
|
|
||||||
res = (function () {
|
res = (function () {
|
||||||
for (let i = 0; i < args.length; i++)
|
for (let i = 0; i < args.length; i++)
|
||||||
for (let j in Iterator(args[i]))
|
for (let j in iter(args[i]))
|
||||||
yield j;
|
yield j;
|
||||||
})();
|
})();
|
||||||
|
else if (isinstance(obj, ["Iterator", "Generator"]))
|
||||||
|
;
|
||||||
else if (ctypes && ctypes.CData && obj instanceof ctypes.CData) {
|
else if (ctypes && ctypes.CData && obj instanceof ctypes.CData) {
|
||||||
while (obj.constructor instanceof ctypes.PointerType)
|
while (obj.constructor instanceof ctypes.PointerType)
|
||||||
obj = obj.contents;
|
obj = obj.contents;
|
||||||
|
|||||||
@@ -311,7 +311,7 @@ var Config = Module("config", ConfigBase, {
|
|||||||
completion.sidebar = function sidebar(context) {
|
completion.sidebar = function sidebar(context) {
|
||||||
let menu = document.getElementById("viewSidebarMenu");
|
let menu = document.getElementById("viewSidebarMenu");
|
||||||
context.title = ["Sidebar Panel"];
|
context.title = ["Sidebar Panel"];
|
||||||
context.completions = Array.map(menu.childNodes, function (n) [n.label, ""]);
|
context.completions = Array.map(menu.childNodes, function (n) [n.getAttribute("label"), ""]);
|
||||||
};
|
};
|
||||||
|
|
||||||
completion.addUrlCompleter("l",
|
completion.addUrlCompleter("l",
|
||||||
|
|||||||
Reference in New Issue
Block a user