mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 23:27:58 +01:00
move global beep() command to a vimperator slot
This commit is contained in:
@@ -268,7 +268,7 @@ function Commands() //{{{
|
||||
}
|
||||
));
|
||||
addDefaultCommand(new Command(["beep"],
|
||||
/*vimperator.*/beep,
|
||||
function() { vimperator.beep(); },
|
||||
{
|
||||
usage: ["beep"],
|
||||
short_help: "Play a system beep"
|
||||
@@ -930,7 +930,7 @@ function stepInHistory(steps)
|
||||
}
|
||||
else
|
||||
{
|
||||
beep();
|
||||
vimperator.beep();
|
||||
if(index < 0)
|
||||
vimperator.echo("Cannot go past beginning of history");
|
||||
else
|
||||
@@ -1402,20 +1402,20 @@ function scrollBufferRelative(right, down)
|
||||
// beep if we can't go there
|
||||
if (down > 0)
|
||||
{
|
||||
if (win.scrollY == win.scrollMaxY) beep();
|
||||
if (win.scrollY == win.scrollMaxY) vimperator.beep();
|
||||
}
|
||||
else if (down < 0)
|
||||
{
|
||||
if (win.scrollY == 0) beep();
|
||||
if (win.scrollY == 0) vimperator.beep();
|
||||
}
|
||||
|
||||
if (right > 0)
|
||||
{
|
||||
if (win.scrollX == win.scrollMaxX) beep();
|
||||
if (win.scrollX == win.scrollMaxX) vimperator.beep();
|
||||
}
|
||||
else if (right < 0)
|
||||
{
|
||||
if (win.scrollX == 0) beep();
|
||||
if (win.scrollX == 0) vimperator.beep();
|
||||
}
|
||||
|
||||
win.scrollBy(vimperator.input.count * right * 20, vimperator.input.count * down * 20);
|
||||
@@ -1455,12 +1455,12 @@ function zoom_in(factor)
|
||||
if (zoomMgr.textZoom == 25 && factor < 0)
|
||||
{
|
||||
vimperator.echoerr("Minimum zoom level of 25% reached");
|
||||
beep();
|
||||
vimperator.beep();
|
||||
}
|
||||
else if (zoomMgr.textZoom == 500 && factor > 0)
|
||||
{
|
||||
vimperator.echoerr("Maximum zoom level of 500% reached");
|
||||
beep();
|
||||
vimperator.beep();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1499,7 +1499,7 @@ function zoom_to(value)
|
||||
if (value < 25 || value > 500)
|
||||
{
|
||||
vimperator.echoerr("Zoom value must be between 25% and 500%");
|
||||
beep();
|
||||
vimperator.beep();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1521,7 +1521,7 @@ function copyToClipboard(str)
|
||||
clipboardHelper.copyString(str);
|
||||
}
|
||||
|
||||
function beep()
|
||||
Vimperator.prototype.beep = function()
|
||||
{
|
||||
if (!vimperator.options["beep"])
|
||||
return;
|
||||
|
||||
@@ -213,7 +213,7 @@ function Hints() //{{{
|
||||
//if (linkCount == 0 && hintmode != HINT_MODE_ALWAYS)
|
||||
if (linkCount == 0 && !vimperator.hasMode(vimperator.modes.ALWAYS_HINT))
|
||||
{
|
||||
beep();
|
||||
vimperator.beep();
|
||||
//alert('h');
|
||||
this.disableHahMode(win);
|
||||
//alert('g');
|
||||
|
||||
@@ -361,13 +361,13 @@ function CommandLine() //{{{
|
||||
if (history_index <= -1)
|
||||
{
|
||||
history_index = 0;
|
||||
beep();
|
||||
vimperator.beep();
|
||||
break;
|
||||
}
|
||||
if (history_index >= history.length + 1)
|
||||
{
|
||||
history_index = history.length;
|
||||
beep();
|
||||
vimperator.beep();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -377,7 +377,7 @@ function CommandLine() //{{{
|
||||
return;
|
||||
}
|
||||
}
|
||||
beep();
|
||||
vimperator.beep();
|
||||
}
|
||||
|
||||
/* user pressed TAB to get completions of a command */
|
||||
@@ -416,7 +416,7 @@ function CommandLine() //{{{
|
||||
|
||||
if (completions.length == 0)
|
||||
{
|
||||
beep();
|
||||
vimperator.beep();
|
||||
// prevent tab from moving to the next field
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
@@ -558,7 +558,7 @@ function Events() //{{{
|
||||
// no mapping found, beep()
|
||||
if (vimperator.hints.currentState() == 1)
|
||||
{
|
||||
beep();
|
||||
vimperator.beep();
|
||||
vimperator.hints.disableHahMode();
|
||||
vimperator.input.buffer = "";
|
||||
vimperator.statusline.updateInputBuffer(vimperator.input.buffer);
|
||||
@@ -570,7 +570,7 @@ function Events() //{{{
|
||||
var res = vimperator.hints.processEvent(event);
|
||||
if (res < 0) // error occured processing this key
|
||||
{
|
||||
beep();
|
||||
vimperator.beep();
|
||||
//if(vimperator.hints.currentMode() == HINT_MODE_QUICK)
|
||||
if(vimperator.hasMode(vimperator.modes.QUICK_HINT))
|
||||
vimperator.hints.disableHahMode();
|
||||
@@ -656,7 +656,7 @@ function Events() //{{{
|
||||
{
|
||||
vimperator.input.buffer = "";
|
||||
vimperator.input.pendingMap = null;
|
||||
beep();
|
||||
vimperator.beep();
|
||||
}
|
||||
}
|
||||
vimperator.statusline.updateInputBuffer(vimperator.input.buffer);
|
||||
@@ -1003,7 +1003,7 @@ function Tabs() //{{{
|
||||
var index = indexFromSpec(spec, wrap);
|
||||
if (index === false)
|
||||
{
|
||||
beep(); // XXX: move to ex-handling?
|
||||
vimperator.beep(); // XXX: move to ex-handling?
|
||||
return false;
|
||||
}
|
||||
getBrowser().mTabContainer.selectedIndex = index;
|
||||
|
||||
Reference in New Issue
Block a user