From 94dda55f32c4c05b2d0c18cacf76310b46dca06b Mon Sep 17 00:00:00 2001 From: anekos Date: Sun, 9 Nov 2008 10:40:53 +0000 Subject: meow meow fixes. git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@23054 d0d07461-0603-4401-acd4-de1884942a52 --- yetmappings.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'yetmappings.js') diff --git a/yetmappings.js b/yetmappings.js index 41722bc..71ad7dd 100644 --- a/yetmappings.js +++ b/yetmappings.js @@ -25,20 +25,14 @@ function exists (modes, key) (mappings.getCandidates(modes, key).length || mappings.get(modes, key)); - function getYetMappings (pre) { - let result = []; - keys.forEach(function (key) { - if (!exists([modes.NORMAL], pre + key)) - result.push(key); - }); - return result; - } + function getYetMappings (pre) + keys.filter(function (key) (!exists([modes.NORMAL], pre + key))); commands.addUserCommand( ['yetmap[pings]', 'ymap'], 'display the keys that are not mapped yet.', function (arg) { - liberator.echo(getYetMappings(arg.string || '').join(' '), commandline.FORCE_MULTILINE); + liberator.echo(getYetMappings(arg.string || '').join(' ')); }, { argCount: '*' -- cgit v1.2.3