diff options
author | drry | 2009-01-09 19:29:29 +0000 |
---|---|---|
committer | drry | 2009-01-09 19:29:29 +0000 |
commit | 75d1415b8b03dfb50f08d00e53c013f6b390368a (patch) | |
tree | 39b43db35c67490fc64a5b66c9b3c5a43bacea8e /localkeymode.js | |
parent | e58241048c76a7ab49487662ebc6854e06c481d1 (diff) | |
download | vimperator-plugins-75d1415b8b03dfb50f08d00e53c013f6b390368a.tar.bz2 |
* cosmetic changes.
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@28232 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'localkeymode.js')
-rw-r--r-- | localkeymode.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/localkeymode.js b/localkeymode.js index 119586a..e27468c 100644 --- a/localkeymode.js +++ b/localkeymode.js @@ -83,7 +83,7 @@ liberator.plugins.LocalKeyMode = (function() { // utility function function cloneMap(org, key) { return new Map( - org.modes, key ? key : org.names, org.description, org.action, + org.modes, key || org.names, org.description, org.action, {flags:org.flags, rhs:org.rhs, noremap:org.noremap } ); } @@ -163,18 +163,18 @@ liberator.plugins.LocalKeyMode = (function() { var delkeys = []; if (!(uri instanceof RegExp) ) uri = new RegExp(uri.replace(/(?=[^-0-9A-Za-z_@])/g, '\\')); - items.forEach( function( [key, command, extra] ){ + items.forEach( function( [key, command, extra] ) { if (!key) return; else if (!command) delkeys = delkeys.concat( key.split(' ')); else { key = key instanceof Array ? key : [key]; - extra = extra ? extra : new Object(); + extra = extra || new Object(); if (!extra || !extra.rhs) extra.rhs = (command+'').replace(rhsRegExp, ' '); - if (typeof command != 'function'){ + if (typeof command != 'function') { let cmdName = command; if (command.charAt(0) == ':') - command = extra.noremap ? function () commandline.open("", cmdName, modes.EX) - : function () liberator.execute(cmdName); + command = extra.noremap ? function () commandline.open("", cmdName, modes.EX) + : function () liberator.execute(cmdName); else command = function () feedKeys( command, extra.noremap, true); } @@ -312,7 +312,7 @@ liberator.plugins.LocalKeyMode = (function() { } } }, { - completer: function(context, arg, special){ + completer: function(context, arg, special) { let filter = context.filter; var names = self.completeNames; context.title = ['Name','Description']; |