mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-04 06:54:11 +01:00
replace some echo() calls with echomsg()
This commit is contained in:
@@ -836,7 +836,7 @@ function Commands() //{{{
|
||||
}
|
||||
else
|
||||
{
|
||||
liberator.echo("No user-defined commands found");
|
||||
liberator.echomsg("No user-defined commands found");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -128,7 +128,10 @@ function AutoCommands() //{{{
|
||||
{
|
||||
args = args.string;
|
||||
if (/^\s*$/.test(args))
|
||||
return liberator.echo("No matching autocommands");
|
||||
{
|
||||
liberator.echomsg("No matching autocommands");
|
||||
return;
|
||||
}
|
||||
|
||||
let [, event, url] = args.match(/^(\S+)(?:\s+(\S+))?$/);
|
||||
url = url || buffer.URL;
|
||||
@@ -148,7 +151,7 @@ function AutoCommands() //{{{
|
||||
// TODO: perhaps trigger could return the number of autocmds triggered
|
||||
// TODO: Perhaps this should take -args to pass to the command?
|
||||
if (!autocommands.get(event).some(function (c) c.pattern.test(url)))
|
||||
liberator.echo("No matching autocommands");
|
||||
liberator.echomsg("No matching autocommands");
|
||||
else
|
||||
autocommands.trigger(event, { url: url });
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ function IO() //{{{
|
||||
if (isAbsolutePath(args))
|
||||
{
|
||||
if (io.setCurrentDirectory(args))
|
||||
liberator.echo(io.getCurrentDirectory().path);
|
||||
liberator.echomsg(io.getCurrentDirectory().path);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -233,7 +233,7 @@ function IO() //{{{
|
||||
if (dir.exists() && dir.isDirectory() && dir.isReadable())
|
||||
{
|
||||
io.setCurrentDirectory(dir.path);
|
||||
liberator.echo(io.getCurrentDirectory().path);
|
||||
liberator.echomsg(io.getCurrentDirectory().path);
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
@@ -260,7 +260,7 @@ function IO() //{{{
|
||||
|
||||
commands.add(["pw[d]"],
|
||||
"Print the current directory name",
|
||||
function () { liberator.echo(io.getCurrentDirectory().path); },
|
||||
function () { liberator.echomsg(io.getCurrentDirectory().path); },
|
||||
{ argCount: "0" });
|
||||
|
||||
// "mkv[imperatorrc]" or "mkm[uttatorrc]"
|
||||
|
||||
@@ -919,7 +919,7 @@ const liberator = (function () //{{{
|
||||
if (config.helpFiles.indexOf(helpFile) != -1)
|
||||
liberator.open("chrome://liberator/locale/" + helpFile, where);
|
||||
else
|
||||
liberator.echo("Sorry, help file " + helpFile.quote() + " not found");
|
||||
liberator.echomsg("Sorry, help file " + helpFile.quote() + " not found");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -401,7 +401,7 @@ function Mappings() //{{{
|
||||
// TODO: Move this to an ItemList to show this automatically
|
||||
if (list.*.length() == list.text().length())
|
||||
{
|
||||
liberator.echo("No mapping found");
|
||||
liberator.echomsg("No mapping found");
|
||||
return;
|
||||
}
|
||||
commandline.echo(list, commandline.HL_NORMAL, commandline.FORCE_MULTILINE);
|
||||
|
||||
@@ -443,7 +443,7 @@ function Options() //{{{
|
||||
if (str.*.length())
|
||||
liberator.echo(str, commandline.FORCE_MULTILINE);
|
||||
else
|
||||
liberator.echo("No variables found");
|
||||
liberator.echomsg("No variables found");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -334,7 +334,7 @@ function Tabs() //{{{
|
||||
}
|
||||
|
||||
if (removed > 0)
|
||||
liberator.echo(removed + " fewer tab(s)");
|
||||
liberator.echomsg(removed + " fewer tab(s)", 9);
|
||||
else
|
||||
liberator.echoerr("E94: No matching tab for " + args);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user