1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-12 02:55:48 +01:00

Merge branch 'master' of kmaglione@git.vimperator.org:/git/vimperator/liberator

This commit is contained in:
Kris Maglione
2008-12-29 13:55:48 -05:00
28 changed files with 217 additions and 215 deletions

View File

@@ -32,7 +32,7 @@ const Point = new Struct("x", "y");
/**
* A class to manage the primary web content buffer. The name comes
* from vim's term, 'buffer', which signifies instances of open
* from Vim's term, 'buffer', which signifies instances of open
* files.
* @instance buffer
*/
@@ -1428,8 +1428,8 @@ function Marks() //{{{
////////////////////// PRIVATE SECTION /////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{
var localMarks = storage.newMap('local-marks', true);
var urlMarks = storage.newMap('url-marks', true);
var localMarks = storage.newMap("local-marks", true);
var urlMarks = storage.newMap("url-marks", true);
var pendingJumps = [];
var appContent = document.getElementById("appcontent");
@@ -1457,7 +1457,7 @@ function Marks() //{{{
return name + ", " + mark.location +
", (" + Math.round(mark.position.x * 100) +
"%, " + Math.round(mark.position.y * 100) + "%)" +
(('tab' in mark) ? ", tab: " + tabs.index(mark.tab) : "");
(("tab" in mark) ? ", tab: " + tabs.index(mark.tab) : "");
}
function removeLocalMark(mark)

View File

@@ -924,7 +924,7 @@ function Commands() //{{{
[["-count"], commandManager.OPTION_NOARG],
[["-complete"], commandManager.OPTION_STRING,
function (arg) arg in completeOptionMap || /custom,\w+/.test(arg),
function (context) [[k, ''] for ([k, v] in Iterator(completeOptionMap))]]
function (context) [[k, ""] for ([k, v] in Iterator(completeOptionMap))]]
],
literal: 1,
serial: function () [

View File

@@ -1338,6 +1338,7 @@ function Completion() //{{{
context.completions = config.autocommands;
},
// TODO: shouldn't these app-specific completers be moved to config.js? --djk
bookmark: function bookmark(context, tags, extra)
{
context.title = ["Bookmark", "Title"];

View File

@@ -4,7 +4,7 @@ catch (e)
{
__liberator_eval_error = e;
}
// Important: The eval statement *must* remain on the first line
// IMPORTANT: The eval statement *must* remain on the first line
// in order for line numbering in any errors to remain correct.
//
// vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -299,7 +299,7 @@ function Events() //{{{
var inputBufferLength = 0; // count the number of keys in v.input.buffer (can be different from v.input.buffer.length)
var skipMap = false; // while feeding the keys (stored in v.input.buffer | no map found) - ignore mappings
var macros = storage.newMap('macros', true);
var macros = storage.newMap("macros", true);
var currentMacro = "";
var lastMacro = "";
@@ -806,7 +806,7 @@ function Events() //{{{
{
if (lastMacro.length == 1)
// TODO: ignore this like Vim?
liberator.echoerr("Exxx: Register " + lastMacro + " not set");
liberator.echoerr("Exxx: Register '" + lastMacro + "' not set");
else
liberator.echoerr("Exxx: Named macro '" + lastMacro + "' not set");
}

View File

@@ -9,3 +9,4 @@ let url = page ? "chrome://liberator/locale/" + page : content.history.previous;
win.getBrowser().loadURIWithFlags(url, Components.interfaces.nsIWebNavigation.LOAD_FLAGS_REPLACE_HISTORY, null, null, null);
// vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -1113,6 +1113,7 @@ const liberator = (function () //{{{
break;
default:
// FIXME: should this really be a user-visible error? --djk
liberator.echoerr("Exxx: Invalid 'where' directive in liberator.open(...)");
return false;
}

View File

@@ -44,12 +44,12 @@ function Tabs() //{{{
{
if (!tabmail)
{
tabmail = document.getElementById('tabmail');
tabmail.__defineGetter__('mTabContainer', function () this.tabContainer);
tabmail.__defineGetter__('mTabs', function () this.tabContainer.childNodes);
tabmail.__defineGetter__('mCurrentTab', function () this.tabContainer.selectedItem);
tabmail.__defineGetter__('mStrip', function () this.tabStrip);
tabmail.__defineGetter__('browsers', function () [browser for (browser in Iterator(this.mTabs))] );
tabmail = document.getElementById("tabmail");
tabmail.__defineGetter__("mTabContainer", function () this.tabContainer);
tabmail.__defineGetter__("mTabs", function () this.tabContainer.childNodes);
tabmail.__defineGetter__("mCurrentTab", function () this.tabContainer.selectedItem);
tabmail.__defineGetter__("mStrip", function () this.tabStrip);
tabmail.__defineGetter__("browsers", function () [browser for (browser in Iterator(this.mTabs))] );
}
return tabmail;
};
@@ -123,7 +123,7 @@ function Tabs() //{{{
let tabStrip = tabs.tabStrip;
if (!tabStrip)
return options['showtabline']; // XXX
return options["showtabline"]; // XXX
if (value == 0)
{

View File

@@ -95,7 +95,7 @@ function CommandLine() //{{{
let str = this.input.value;
if (/^\s*$/.test(str))
return;
this.store.mutate('filter', function (line) line != str);
this.store.mutate("filter", function (line) line != str);
this.store.push(str);
this.store.truncate(options["history"], true);
},

View File

@@ -452,8 +452,8 @@ const util = { //{{{
try
{
const clipboard = Cc['@mozilla.org/widget/clipboard;1'].getService(Ci.nsIClipboard);
const transferable = Cc['@mozilla.org/widget/transferable;1'].createInstance(Ci.nsITransferable);
const clipboard = Cc["@mozilla.org/widget/clipboard;1"].getService(Ci.nsIClipboard);
const transferable = Cc["@mozilla.org/widget/transferable;1"].createInstance(Ci.nsITransferable);
transferable.addDataFlavor("text/unicode");