From 58e72b41f989a21113a28cc02b7b13564ce4b12c Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sat, 27 Oct 2007 05:45:51 +0000 Subject: [PATCH] allow lowercase modifier chars in the {lhs} arg of :map and related commands --- content/mappings.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/content/mappings.js b/content/mappings.js index e5317603..859a06ca 100644 --- a/content/mappings.js +++ b/content/mappings.js @@ -124,10 +124,8 @@ vimperator.Mappings = function() //{{{ for (var i = 0; i < maps.length; i++) { - names = maps[i].names; - for (var j = 0; j < names.length; j++) - if (names[j] == cmd) - return maps[i]; + if (maps[i].hasName(cmd)) + return maps[i]; } return null; @@ -213,7 +211,11 @@ vimperator.Mappings = function() //{{{ this.add = function(map) { for (var i = 0; i < map.names.length; i++) + { + // only store keysyms with uppercase modifier strings + map.names[i] = map.names[i].replace(/[casm]-/g, function($0) { return $0.toUpperCase(); }); removeMap(map.mode, map.names[i]); + } user[map.mode].push(map); }