mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 00:27:57 +01:00
assign an object literal to v.Command.prototype rather than using individual
function assignments
This commit is contained in:
@@ -90,14 +90,16 @@ vimperator.Command = function (specs, action, extraInfo) //{{{
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
vimperator.Command.prototype.execute = function (args, special, count, modifiers)
|
vimperator.Command.prototype = {
|
||||||
|
|
||||||
|
execute: function (args, special, count, modifiers)
|
||||||
{
|
{
|
||||||
return this.action.call(this, args, special, count, modifiers);
|
return this.action.call(this, args, special, count, modifiers);
|
||||||
};
|
},
|
||||||
|
|
||||||
// return true if the candidate name matches one of the command's aliases
|
// return true if the candidate name matches one of the command's aliases
|
||||||
// (including all acceptable abbreviations)
|
// (including all acceptable abbreviations)
|
||||||
vimperator.Command.prototype.hasName = function (name)
|
hasName: function (name)
|
||||||
{
|
{
|
||||||
// match a candidate name against a command name abbreviation spec - returning
|
// match a candidate name against a command name abbreviation spec - returning
|
||||||
// true if the candidate matches unambiguously
|
// true if the candidate matches unambiguously
|
||||||
@@ -124,6 +126,8 @@ vimperator.Command.prototype.hasName = function (name)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
//}}}
|
//}}}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user