diff --git a/common/content/commands.js b/common/content/commands.js index fe3b9fdc..f0f053cc 100644 --- a/common/content/commands.js +++ b/common/content/commands.js @@ -836,7 +836,7 @@ function Commands() //{{{ } else { - liberator.echo("No user-defined commands found"); + liberator.echomsg("No user-defined commands found"); } } }, diff --git a/common/content/events.js b/common/content/events.js index 1ad20b0b..cb29e846 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -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 }); } diff --git a/common/content/io.js b/common/content/io.js index 11ae8c47..a28d52b0 100644 --- a/common/content/io.js +++ b/common/content/io.js @@ -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]" diff --git a/common/content/liberator.js b/common/content/liberator.js index ff24f5cd..5fc9b1aa 100644 --- a/common/content/liberator.js +++ b/common/content/liberator.js @@ -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; } diff --git a/common/content/mappings.js b/common/content/mappings.js index ffc0ab60..13bb318a 100644 --- a/common/content/mappings.js +++ b/common/content/mappings.js @@ -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); diff --git a/common/content/options.js b/common/content/options.js index e5e71121..2dfb7e63 100644 --- a/common/content/options.js +++ b/common/content/options.js @@ -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; } diff --git a/common/content/tabs.js b/common/content/tabs.js index d82899df..e028d9a7 100644 --- a/common/content/tabs.js +++ b/common/content/tabs.js @@ -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); } diff --git a/muttator/content/addressbook.js b/muttator/content/addressbook.js index f275f362..49b3b83b 100644 --- a/muttator/content/addressbook.js +++ b/muttator/content/addressbook.js @@ -123,7 +123,7 @@ function Addressbook() //{{{ displayName = generateDisplayName(firstName, lastName); if (addressbook.add(mailAddr, firstName, lastName, displayName)) - liberator.echo("Added address: " + displayName + " <" + mailAddr + ">", commandline.FORCE_SINGLELINE); + liberator.echomsg("Added address: " + displayName + " <" + mailAddr + ">", 1, commandline.FORCE_SINGLELINE); else liberator.echoerr("Exxx: Could not add bookmark `" + mailAddr + "'", commandline.FORCE_SINGLELINE); diff --git a/muttator/content/mail.js b/muttator/content/mail.js index aac88fb4..0fc6fa13 100644 --- a/muttator/content/mail.js +++ b/muttator/content/mail.js @@ -138,12 +138,12 @@ function Mail() //{{{ if (copy) { MsgCopyMessage(folders[0]); - setTimeout(function () { liberator.echo(count + " message(s) copied to " + folders[0].prettyName); }, 100); + setTimeout(function () { liberator.echomsg(count + " message(s) copied to " + folders[0].prettyName, 1); }, 100); } else { MsgMoveMessage(folders[0]); - setTimeout(function () { liberator.echo(count + " message(s) moved to " + folders[0].prettyName); }, 100); + setTimeout(function () { liberator.echomsg(count + " message(s) moved to " + folders[0].prettyName, 1); }, 100); } return true; } diff --git a/vimperator/content/bookmarks.js b/vimperator/content/bookmarks.js index 051f5366..c14790f1 100644 --- a/vimperator/content/bookmarks.js +++ b/vimperator/content/bookmarks.js @@ -321,7 +321,7 @@ function Bookmarks() //{{{ if (bookmarks.add(false, title, url, keyword, tags, args.bang)) { let extra = (title == url) ? "" : " (" + title + ")"; - liberator.echo("Added bookmark: " + url + extra, commandline.FORCE_SINGLELINE); + liberator.echomsg("Added bookmark: " + url + extra, 1, commandline.FORCE_SINGLELINE); } else liberator.echoerr("Exxx: Could not add bookmark `" + title + "'", commandline.FORCE_SINGLELINE); @@ -368,7 +368,7 @@ function Bookmarks() //{{{ let url = args.string || buffer.URL; let deletedCount = bookmarks.remove(url); - liberator.echo(deletedCount + " bookmark(s) with url `" + url + "' deleted", commandline.FORCE_SINGLELINE); + liberator.echomsg(deletedCount + " bookmark(s) with url `" + url + "' deleted", 1, commandline.FORCE_SINGLELINE); }, { argCount: "?",