summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/content/modes.js7
-rw-r--r--common/content/style.js22
-rw-r--r--common/content/ui.js4
-rw-r--r--vimperator/TODO5
4 files changed, 21 insertions, 17 deletions
diff --git a/common/content/modes.js b/common/content/modes.js
index 80e2d2b6..de88c3be 100644
--- a/common/content/modes.js
+++ b/common/content/modes.js
@@ -155,10 +155,11 @@ const modes = (function () //{{{
// show the current mode string in the command line
show: function ()
{
- if (!options["showmode"])
- return;
+ let msg = "";
+ 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
diff --git a/common/content/style.js b/common/content/style.js
index 25cba58d..a662cd48 100644
--- a/common/content/style.js
+++ b/common/content/style.js
@@ -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");
function keys() [k for ([k, v] in Iterator(highlight))].sort();
+
this.__iterator__ = function () (highlight[v] for ([k, v] in Iterator(keys())));
this.get = function (k) highlight[k];
@@ -173,6 +174,12 @@ function Highlights(name, store, serial)
return "[liberator|highlight~=" + hl + "]" + rest
};
+ this.clear = function ()
+ {
+ for (let [k, v] in Iterator(highlight))
+ this.set(k, null, true);
+ };
+
this.reload = function ()
{
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];
- if (io.sourceFromRuntimePath(["colors/" + scheme + ".vimp"]))
- autocommands.trigger("ColorScheme", { name: scheme });
- else
- liberator.echoerr("E185: Cannot find color scheme " + scheme);
+ if (scheme == "default")
+ highlight.clear();
+ else if (!io.sourceFromRuntimePath(["colors/" + scheme + ".vimp"]))
+ return liberator.echoerr("E185: Cannot find color scheme " + scheme);
+ autocommands.trigger("ColorScheme", { name: scheme });
},
{
argCount: "1",
@@ -581,11 +589,7 @@ liberator.registerObserver("load_commands", function ()
return;
}
if (!key && clear)
- {
- for (let h in highlight)
- highlight.set(h.class, null, true);
- return;
- }
+ return highlight.clear();
let error = highlight.set(key, css, clear, "-append" in args);
if (error)
liberator.echoerr(error);
diff --git a/common/content/ui.js b/common/content/ui.js
index 05a88b36..2a5e8456 100644
--- a/common/content/ui.js
+++ b/common/content/ui.js
@@ -941,6 +941,7 @@ function CommandLine() //{{{
if (!keepCommand || this.silent)
{
outputContainer.collapsed = true;
+ commandline.updateMorePrompt();
this.hide();
}
if (!outputContainer.collapsed)
@@ -1390,6 +1391,9 @@ function CommandLine() //{{{
updateMorePrompt: function updateMorePrompt(force, showHelp)
{
+ if (outputContainer.collapsed)
+ return echoLine("", this.HL_NORMAL);
+
let win = multilineOutputWidget.contentWindow;
function isScrollable() !win.scrollMaxY == 0;
function atEnd() win.scrollY / win.scrollMaxY >= 1;
diff --git a/vimperator/TODO b/vimperator/TODO
index c79d15c1..3479ffaa 100644
--- a/vimperator/TODO
+++ b/vimperator/TODO
@@ -22,16 +22,11 @@ BUGS:
(recent CVS regressions):
- 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:
9 fix local options
9 adaptive timeout for auto-completions, :set completions can be updated more often than
:open foo
-9 :colorscheme default
9 use the storage module for autocommands
8 :redir and 'verbosefile'
8 middleclick in content == p, and if command line is open, paste there the clipboard buffer