1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 10:18:00 +01:00

Highlight substrings matching the filter in completions. Fix javascript completion and :hi. Run dump() arguments through objectToString and append "\n"

This commit is contained in:
Kris Maglione
2008-10-07 20:33:44 +00:00
parent 01e89bc6d8
commit 08ac946225
7 changed files with 109 additions and 38 deletions

View File

@@ -34,11 +34,11 @@ liberator.Buffer = function () //{{{
////////////////////// PRIVATE SECTION /////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{
const highlightClasses = ["Boolean", "ErrorMsg", "Function", "InfoMsg", "Keyword",
const highlightClasses = ["Boolean", "ErrorMsg", "Filter", "Function", "InfoMsg", "Keyword",
"LineNr", "ModeMsg", "MoreMsg", "Normal", "Null", "Number", "Question",
"StatusLine", "StatusLineBroken", "StatusLineSecure", "String", "Tag",
"Title", "URL", "WarningMsg",
["Hint", ".liberator-hint", "*"]
["Hint", ".liberator-hint", "*"],
["Search", ".__liberator-search", "*"],
["Bell", "#liberator-visualbell"],
];
@@ -806,7 +806,10 @@ liberator.Buffer = function () //{{{
},
{
// TODO: add this as a standard highlight completion function?
completer: function (filter) [0, liberator.completion.filter([[v, ""] for ([k, v] in Iterator(highlightClasses))], filter)],
// I agree. It could (should) be much more sophisticated. --Kris
completer: function (filter) [0,
liberator.completion.filter([[v instanceof Array ? v[0] : v, ""] for ([k, v] in Iterator(highlightClasses))], filter)
],
hereDoc: true,
bang: true,
});