1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 09:17:59 +01:00

remove some unnecessary boolean 'error' return values

This commit is contained in:
Doug Kearns
2007-12-02 08:59:08 +00:00
parent f6e18dd5d8
commit 85520073b4

View File

@@ -43,7 +43,7 @@ vimperator.Buffer = function () //{{{
if (value < 1 || value > 2000) if (value < 1 || value > 2000)
{ {
vimperator.echoerr("Zoom value out of range (1-2000%)"); vimperator.echoerr("Zoom value out of range (1-2000%)");
return false; return;
} }
if (fullZoom) if (fullZoom)
@@ -449,7 +449,7 @@ vimperator.Buffer = function () //{{{
updateBufferList: function () updateBufferList: function ()
{ {
if (!vimperator.bufferwindow.visible()) if (!vimperator.bufferwindow.visible())
return false; return;
var items = vimperator.completion.buffer("")[1]; var items = vimperator.completion.buffer("")[1];
vimperator.bufferwindow.show(items); vimperator.bufferwindow.show(items);
@@ -481,7 +481,10 @@ vimperator.Buffer = function () //{{{
var match; var match;
if (match = buffer.match(/^(\d+):?/)) if (match = buffer.match(/^(\d+):?/))
return vimperator.tabs.select(parseInt(match[1], 10) - 1, false); // make it zero-based {
vimperator.tabs.select(parseInt(match[1], 10) - 1, false); // make it zero-based
return;
}
var matches = []; var matches = [];
var lowerBuffer = buffer.toLowerCase(); var lowerBuffer = buffer.toLowerCase();
@@ -492,7 +495,10 @@ vimperator.Buffer = function () //{{{
var url = getBrowser().getBrowserAtIndex(index).contentDocument.location.href; var url = getBrowser().getBrowserAtIndex(index).contentDocument.location.href;
var title = getBrowser().getBrowserAtIndex(index).contentDocument.title.toLowerCase(); var title = getBrowser().getBrowserAtIndex(index).contentDocument.title.toLowerCase();
if (url == buffer) if (url == buffer)
return vimperator.tabs.select(index, false); {
vimperator.tabs.select(index, false);
return;
}
if (url.indexOf(buffer) >= 0 || title.indexOf(lowerBuffer) >= 0) if (url.indexOf(buffer) >= 0 || title.indexOf(lowerBuffer) >= 0)
matches.push(index); matches.push(index);