1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 05:08:00 +01:00

Update TODO, add :colo default (== :hi clear)

This commit is contained in:
Kris Maglione
2008-12-16 16:42:10 -05:00
parent ad94daa5a7
commit ff8cd3e194
4 changed files with 21 additions and 17 deletions

View File

@@ -155,10 +155,11 @@ const modes = (function () //{{{
// show the current mode string in the command line // show the current mode string in the command line
show: function () show: function ()
{ {
if (!options["showmode"]) let msg = "";
return; if (options["showmode"])
msg = getModeMessage();
commandline.echo(getModeMessage(), "ModeMsg", commandline.FORCE_SINGLELINE); commandline.echo(msg, "ModeMsg", commandline.FORCE_SINGLELINE);
}, },
// add/remove always work on the extended mode only // add/remove always work on the extended mode only

View File

@@ -127,6 +127,7 @@ function Highlights(name, store, serial)
Highlight.prototype.toString = function () "Highlight(" + this.class + ")\n\t" + [k + ": " + util.escapeString(v || "undefined") for ([k, v] in this)].join("\n\t"); Highlight.prototype.toString = function () "Highlight(" + this.class + ")\n\t" + [k + ": " + util.escapeString(v || "undefined") for ([k, v] in this)].join("\n\t");
function keys() [k for ([k, v] in Iterator(highlight))].sort(); function keys() [k for ([k, v] in Iterator(highlight))].sort();
this.__iterator__ = function () (highlight[v] for ([k, v] in Iterator(keys()))); this.__iterator__ = function () (highlight[v] for ([k, v] in Iterator(keys())));
this.get = function (k) highlight[k]; this.get = function (k) highlight[k];
@@ -173,6 +174,12 @@ function Highlights(name, store, serial)
return "[liberator|highlight~=" + hl + "]" + rest return "[liberator|highlight~=" + hl + "]" + rest
}; };
this.clear = function ()
{
for (let [k, v] in Iterator(highlight))
this.set(k, null, true);
};
this.reload = function () this.reload = function ()
{ {
this.CSS.replace(/\{((?:.|\n)*?)\}/g, function (_, _1) _1.replace(/\n\s*/g, " ")) this.CSS.replace(/\{((?:.|\n)*?)\}/g, function (_, _1) _1.replace(/\n\s*/g, " "))
@@ -453,10 +460,11 @@ liberator.registerObserver("load_commands", function ()
{ {
let scheme = args[0]; let scheme = args[0];
if (io.sourceFromRuntimePath(["colors/" + scheme + ".vimp"])) if (scheme == "default")
autocommands.trigger("ColorScheme", { name: scheme }); highlight.clear();
else else if (!io.sourceFromRuntimePath(["colors/" + scheme + ".vimp"]))
liberator.echoerr("E185: Cannot find color scheme " + scheme); return liberator.echoerr("E185: Cannot find color scheme " + scheme);
autocommands.trigger("ColorScheme", { name: scheme });
}, },
{ {
argCount: "1", argCount: "1",
@@ -581,11 +589,7 @@ liberator.registerObserver("load_commands", function ()
return; return;
} }
if (!key && clear) if (!key && clear)
{ return highlight.clear();
for (let h in highlight)
highlight.set(h.class, null, true);
return;
}
let error = highlight.set(key, css, clear, "-append" in args); let error = highlight.set(key, css, clear, "-append" in args);
if (error) if (error)
liberator.echoerr(error); liberator.echoerr(error);

View File

@@ -941,6 +941,7 @@ function CommandLine() //{{{
if (!keepCommand || this.silent) if (!keepCommand || this.silent)
{ {
outputContainer.collapsed = true; outputContainer.collapsed = true;
commandline.updateMorePrompt();
this.hide(); this.hide();
} }
if (!outputContainer.collapsed) if (!outputContainer.collapsed)
@@ -1390,6 +1391,9 @@ function CommandLine() //{{{
updateMorePrompt: function updateMorePrompt(force, showHelp) updateMorePrompt: function updateMorePrompt(force, showHelp)
{ {
if (outputContainer.collapsed)
return echoLine("", this.HL_NORMAL);
let win = multilineOutputWidget.contentWindow; let win = multilineOutputWidget.contentWindow;
function isScrollable() !win.scrollMaxY == 0; function isScrollable() !win.scrollMaxY == 0;
function atEnd() win.scrollY / win.scrollMaxY >= 1; function atEnd() win.scrollY / win.scrollMaxY >= 1;

View File

@@ -22,16 +22,11 @@ BUGS:
(recent CVS regressions): (recent CVS regressions):
- visual caret mode is broken - visual caret mode is broken
- Form elements in iframes must be selected twice, whether by tabbing or
clicking.
- :regressions is broken
- :set noshowmode | :echo "foobar\n"<ESC> doesn't clear the more prompt
FEATURES: FEATURES:
9 fix local options 9 fix local options
9 adaptive timeout for auto-completions, :set completions can be updated more often than 9 adaptive timeout for auto-completions, :set completions can be updated more often than
:open foo :open foo
9 :colorscheme default
9 use the storage module for autocommands 9 use the storage module for autocommands
8 :redir and 'verbosefile' 8 :redir and 'verbosefile'
8 middleclick in content == p, and if command line is open, paste there the clipboard buffer 8 middleclick in content == p, and if command line is open, paste there the clipboard buffer