1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 19:27:58 +01:00

Whitespace fixes.

This commit is contained in:
Doug Kearns
2010-09-24 16:26:08 +10:00
parent 904f3cb974
commit 0d2b1b6dfd
13 changed files with 41 additions and 41 deletions

View File

@@ -187,7 +187,7 @@ const AutoCommands = Module("autocommands", {
autocommands.remove(event, regex); // remove all
}
else
autocommands.list(event, regex); // list all
autocommands.list(event, regex); // list all
}
}, {
bang: true,

View File

@@ -325,7 +325,7 @@ const Bookmarks = Module("bookmarks", {
let url = args.length == 0 ? buffer.URL : args[0];
let title = args["-title"] || (args.length == 0 ? buffer.title : null);
let keyword = args["-keyword"] || null;
let tags = args["-tags"] || [];
let tags = args["-tags"] || [];
if (bookmarks.add(false, title, url, keyword, tags, args.bang)) {
let extra = (title == url) ? "" : " (" + title + ")";

View File

@@ -1349,7 +1349,7 @@ const Buffer = Module("buffer", {
return {
text: [i + ": " + (tab.label || "(Untitled)"), i + ": " + url],
url: url,
url: url,
indicator: indicator,
icon: tab.image || DEFAULT_FAVICON
};

View File

@@ -133,7 +133,7 @@ const CommandLine = Module("commandline", {
// we need to save the mode which were in before opening the command line
// this is then used if we focus the command line again without the "official"
// way of calling "open"
this._currentExtendedMode = null; // the extended mode which we last openend the command line for
this._currentExtendedMode = null; // the extended mode which we last openend the command line for
this._currentPrompt = null;
this._currentCommand = null;
@@ -640,7 +640,7 @@ const CommandLine = Module("commandline", {
// user pressed <Enter> to carry out a command
// user pressing <Esc> is handled in the global onEscape
// FIXME: <Esc> should trigger "cancel" event
// FIXME: <Esc> should trigger "cancel" event
if (events.isAcceptKey(key)) {
let mode = this._currentExtendedMode; // save it here, as modes.pop() resets it
this._keepCommand = !userContext.hidden_option_no_command_afterimage;
@@ -1592,9 +1592,9 @@ const ItemList = Class("ItemList", {
this._gradient = template.gradient("GradientLeft", "GradientRight");
this._items = null;
this._startIndex = -1; // The index of the first displayed item
this._endIndex = -1; // The index one *after* the last displayed item
this._selIndex = -1; // The index of the currently selected element
this._startIndex = -1; // The index of the first displayed item
this._endIndex = -1; // The index one *after* the last displayed item
this._selIndex = -1; // The index of the currently selected element
this._div = null;
this._divNodes = {};
this._minHeight = 0;

View File

@@ -570,9 +570,9 @@ const Commands = Module("commands", {
if (!argCount)
argCount = "*";
var args = []; // parsed options
var args = []; // parsed options
args.__iterator__ = function () array.iteritems(this);
args.string = str; // for access to the unparsed string
args.string = str; // for access to the unparsed string
args.literalArg = "";
// FIXME!
@@ -712,7 +712,7 @@ const Commands = Module("commands", {
matchOpts(sub);
if (complete) {
if (argCount == "0" || args.length > 0 && (/[1?]/.test(argCount)))
if (argCount == "0" || args.length > 0 && (/[1?]/.test(argCount)))
complete.highlight(i, sub.length, "SPELLCHECK");
}
@@ -776,7 +776,7 @@ const Commands = Module("commands", {
fail("E471: Argument required");
}
else if (args.length == 1 && (argCount == "0") ||
args.length > 1 && /^[01?]$/.test(argCount))
args.length > 1 && /^[01?]$/.test(argCount))
fail("E488: Trailing characters");
return args;

View File

@@ -1002,8 +1002,8 @@ const Dactyl = Module("dactyl", {
* failure.
*
* @param {boolean} condition The condition to test.
* @param {string} message The message to present to the
* user on failure.
* @param {string} message The message to present to the
* user on failure.
*/
assert: function (condition, message) {
if (!condition)

View File

@@ -67,10 +67,10 @@ const Events = Module("events", {
}
this._input = {
buffer: "", // partial command storage
pendingMotionMap: null, // e.g. "d{motion}" if we wait for a motion of the "d" command
pendingArgMap: null, // pending map storage for commands like m{a-z}
count: null // parsed count from the input buffer
buffer: "", // partial command storage
pendingMotionMap: null, // e.g. "d{motion}" if we wait for a motion of the "d" command
pendingArgMap: null, // pending map storage for commands like m{a-z}
count: null // parsed count from the input buffer
};
// load all macros
@@ -283,7 +283,7 @@ const Events = Module("events", {
let wasFeeding = this.feedingKeys;
this.feedingKeys = true;
this.duringFeed = this.duringFeed || [];
let wasQuiet = commandline.quiet;
let wasQuiet = commandline.quiet;
if (quiet)
commandline.quiet = quiet;
@@ -338,9 +338,9 @@ const Events = Module("events", {
* The pseudo-event object (such as may be retrieved from events.fromString)
* should have any properties you want the event to have.
*
* @param {Document} doc The DOM document to associate this event with
* @param {Type} type The type of event (keypress, click, etc.)
* @param {Object} opts The pseudo-event.
* @param {Document} doc The DOM document to associate this event with
* @param {Type} type The type of event (keypress, click, etc.)
* @param {Object} opts The pseudo-event.
*/
create: function (doc, type, opts) {
var DEFAULTS = {
@@ -428,7 +428,7 @@ const Events = Module("events", {
modifier = modifier.toUpperCase();
keyname = keyname.toLowerCase();
if (keyname && !(keyname.length == 1 && modifier.length == 0 || // disallow <> and <a>
if (keyname && !(keyname.length == 1 && modifier.length == 0 || // disallow <> and <a>
!(keyname.length == 1 || this._key_code[keyname] || keyname == "nop" || /mouse$/.test(keyname)))) { // disallow <misteak>
evt_obj.ctrlKey = /C-/.test(modifier);
evt_obj.altKey = /A-/.test(modifier);
@@ -555,7 +555,7 @@ const Events = Module("events", {
// or if the shift has been forced for a non-alphabetical character by the user while :map-ping
if ((key != key.toLowerCase() && (event.ctrlKey || event.altKey || event.metaKey)) || event.dactylShift)
modifier += "S-";
else if (modifier.length == 0)
else if (modifier.length == 0)
return key;
}
}

View File

@@ -13,17 +13,17 @@ const Hints = Module("hints", {
init: function () {
this._hintMode = null;
this._submode = ""; // used for extended mode, can be "o", "t", "y", etc.
this._hintString = ""; // the typed string part of the hint is in this string
this._hintNumber = 0; // only the numerical part of the hint
this._usedTabKey = false; // when we used <Tab> to select an element
this._submode = ""; // used for extended mode, can be "o", "t", "y", etc.
this._hintString = ""; // the typed string part of the hint is in this string
this._hintNumber = 0; // only the numerical part of the hint
this._usedTabKey = false; // when we used <Tab> to select an element
this.prevInput = ""; // record previous user input type, "text" || "number"
this._extendedhintCount = null; // for the count argument of Mode#action (extended hint only)
this._extendedhintCount = null; // for the count argument of Mode#action (extended hint only)
this._pageHints = [];
this._validHints = []; // store the indices of the "hints" array with valid elements
this._activeTimeout = null; // needed for hinttimeout > 0
this._activeTimeout = null; // needed for hinttimeout > 0
this._canUpdate = false;
// keep track of the documents which we generated the hints for
@@ -153,10 +153,10 @@ const Hints = Module("hints", {
*
* Only called by {@link #_generate}.
*
* @param {Object} elem The <area> element.
* @param {number} leftPos The left offset of the image.
* @param {number} topPos The top offset of the image.
* @returns [leftPos, topPos] The updated offsets.
* @param {Object} elem The <area> element.
* @param {number} leftPos The left offset of the image.
* @param {number} topPos The top offset of the image.
* @returns [leftPos, topPos] The updated offsets.
*/
_getAreaOffset: function (elem, leftPos, topPos) {
try {
@@ -834,7 +834,7 @@ const Hints = Module("hints", {
case mappings.getMapLeader():
hints.escNumbers = !hints.escNumbers;
if (hints.escNumbers && this._usedTabKey) // this._hintNumber not used normally, but someone may wants to toggle
this._hintNumber = 0; // <tab>s ? this._reset. Prevent to show numbers not entered.
this._hintNumber = 0; // <tab>s ? this._reset. Prevent to show numbers not entered.
this._updateStatusline();
return;

View File

@@ -139,7 +139,7 @@ const JavaScript = Module("javascript", {
// Todo: Fix these one-letter variable names.
this._i = 0;
this._c = ""; // Current index and character, respectively.
this._c = ""; // Current index and character, respectively.
// Reuse the old stack.
if (this._str && filter.substr(0, this._str.length) == this._str) {
@@ -180,7 +180,7 @@ const JavaScript = Module("javascript", {
// A "." or a "[" dereferences the last "statement" and effectively
// joins it to this logical statement.
if ((this._c == "." || this._c == "[") && /[\w$\])"']/.test(this._lastNonwhite)
|| this._lastNonwhite == "." && /[a-zA-Z_$]/.test(this._c))
|| this._lastNonwhite == "." && /[a-zA-Z_$]/.test(this._c))
this._top.statements.pop();
switch (this._c) {

View File

@@ -555,7 +555,7 @@ const Mappings = Module("mappings", {
});
}
addMapCommands("", [modes.NORMAL, modes.VISUAL], "");
addMapCommands("", [modes.NORMAL, modes.VISUAL], "");
for (let mode in modes.mainModes)
if (mode.char && !commands.get(mode.char + "map", true))

View File

@@ -245,7 +245,7 @@ const Modes = Module("modes", {
get passAllKeys() this._passAllKeys,
set passAllKeys(value) { this._passAllKeys = value; this.show(); },
get isRecording() this._isRecording,
get isRecording() this._isRecording,
set isRecording(value) { this._isRecording = value; this.show(); },
get isReplaying() this._isReplaying,

View File

@@ -963,7 +963,7 @@ const Options = Module("options", {
_loadPreference: function (name, forcedDefault, defaultBranch) {
let defaultValue = null; // XXX
if (forcedDefault != null) // this argument sets defaults for non-user settable options (like extensions.history.comp_history)
if (forcedDefault != null) // this argument sets defaults for non-user settable options (like extensions.history.comp_history)
defaultValue = forcedDefault;
let branch = defaultBranch ? services.get("pref").getDefaultBranch("") : services.get("pref");

View File

@@ -359,7 +359,7 @@ const File = Class("File", {
let array = [e for (e in this.iterDirectory())];
if (sort)
array.sort(function (a, b) b.isDirectory() - a.isDirectory() || String.localeCompare(a.path, b.path));
array.sort(function (a, b) b.isDirectory() - a.isDirectory() || String.localeCompare(a.path, b.path));
return array;
},