diff --git a/NEWS b/NEWS index bb6c843b..df85aa5d 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,7 @@ special versions for the old behavior * IMPORTANT: renamed Startup and Quit autocmd events to VimperatorEnter and VimperatorLeave respectively + * add 'errorbells' * add shell command completion for :! * add :map to prevent a mapping from being echoed * add guioptions=nN to number tabs diff --git a/content/liberator.js b/content/liberator.js index 7f9e85e6..214da768 100644 --- a/content/liberator.js +++ b/content/liberator.js @@ -59,6 +59,10 @@ const liberator = (function () //{{{ // Only general options are added here, which are valid for all vimperator like extensions function addOptions() { + options.add(["errorbells", "eb"], + "Ring the bell when an error message is displayed", + "boolean", false); + const tabopts = [ ["n", "Tab number", null, ".hl-TabNumber"], ["N", "Tab number over icon", null, ".hl-TabIconNumber"], @@ -606,6 +610,7 @@ const liberator = (function () //{{{ beep: function () { + // FIXME: popups clear the command-line if (options["visualbell"]) { // flash the visual bell @@ -825,6 +830,9 @@ const liberator = (function () //{{{ else if (str instanceof Error) str = str.fileName + ":" + str.lineNumber + ": " + str; + if (options["errorbells"]) + liberator.beep(); + commandline.echo(str, commandline.HL_ERRORMSG, flags); }, @@ -840,7 +848,7 @@ const liberator = (function () //{{{ commandline.echo(str, commandline.HL_INFOMSG, flags); }, - // return true, if this VIM-like extension has a certain feature + // return true, if this liberator extension has a certain feature has: function (feature) { var features = config.features || []; diff --git a/locale/en-US/index.txt b/locale/en-US/index.txt index d45646ae..ebbd1f38 100644 --- a/locale/en-US/index.txt +++ b/locale/en-US/index.txt @@ -255,6 +255,7 @@ section:Options[option-index] ||'defsearch'|| Set the default search engine + ||'disabledcssheets'|| Set disabled CSS stylesheets + ||'editor'|| Set the external text editor + +||'errorbells'|| Ring the bell when an error message is displayed + ||'eventignore'|| List of autocommand event names which should be ignored + ||'extendedhinttags'|| XPath string of hintable elements activated by ';' + ||'fileencoding'|| set the charactor encoding for the current page + diff --git a/locale/en-US/options.txt b/locale/en-US/options.txt index 1095710e..74442e05 100644 --- a/locale/en-US/options.txt +++ b/locale/en-US/options.txt @@ -282,6 +282,13 @@ The XPath string of hintable elements activated by [m];[m]. ____ +|\'noeb'| |\'noerrorbells'| |\'eb'| |\'errorbells'| +||'errorbells' 'eb'|| boolean (default: off) +____ +Ring the bell when an error message is displayed. +____ + + |\'ei'| |\'eventignore'| ||'eventignore'|| stringlist (default: "") ____