mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-29 14:32:26 +01:00
Fix completion.
This commit is contained in:
@@ -1692,14 +1692,14 @@ function Completion() //{{{
|
|||||||
{
|
{
|
||||||
context.title = ["Menu Path", "Label"];
|
context.title = ["Menu Path", "Label"];
|
||||||
context.anchored = false;
|
context.anchored = false;
|
||||||
context.keys = { text: "fullMenuPath", description: "label" };
|
context.keys = { text: "fullMenuPath", description: function (item) item.getAttribute("label") };
|
||||||
context.completions = liberator.menuItems;
|
context.completions = liberator.menuItems;
|
||||||
},
|
},
|
||||||
|
|
||||||
option: function option(context, scope)
|
option: function option(context, scope)
|
||||||
{
|
{
|
||||||
context.title = ["Option"];
|
context.title = ["Option"];
|
||||||
context.keys = { text: "fullMenuPath", description: function (item) item.getAttribute("label") };
|
context.keys = { text: "names", description: "description" };
|
||||||
context.completions = options;
|
context.completions = options;
|
||||||
if (scope)
|
if (scope)
|
||||||
context.filters.push(function ({ item: opt }) opt.scope & scope);
|
context.filters.push(function ({ item: opt }) opt.scope & scope);
|
||||||
|
|||||||
@@ -491,7 +491,7 @@ function Styles(name, store, serial)
|
|||||||
let (array = util.Array)
|
let (array = util.Array)
|
||||||
{
|
{
|
||||||
Styles.prototype = {
|
Styles.prototype = {
|
||||||
get sites() array([v.sites for ([k, v] in this.userSheets)]).flatten().uniq(),
|
get sites() array([v.sites for ([k, v] in this.userSheets)]).flatten().uniq().__proto__,
|
||||||
completeSite: function (context, content)
|
completeSite: function (context, content)
|
||||||
{
|
{
|
||||||
let compl = [];
|
let compl = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user