diff --git a/content/events.js b/content/events.js index 4ce50496..4f8648c6 100644 --- a/content/events.js +++ b/content/events.js @@ -995,6 +995,9 @@ vimperator.Events = function () //{{{ else map = vimperator.mappings.get(vimperator.mode, candidateCommand); + var isUniqueMapping = vimperator.mappings.getCandidates(vimperator.mode, candidateCommand).filter( + function(candidate) { return !candidate.noremap; }).length == 1; + // counts must be at the start of a complete mapping (10j -> go 10 lines down) if (/^[1-9][0-9]*$/.test(vimperator.input.buffer + key)) { @@ -1020,10 +1023,9 @@ vimperator.Events = function () //{{{ tmp.execute(null, vimperator.input.count, key); } - } // only follow a map if there isn't a longer possible mapping (allows you to do :map yy, when y is a mapping) - else if (map && !skipMap && vimperator.mappings.getCandidates(vimperator.mode, candidateCommand).length == 1) + else if (map && isUniqueMapping && !skipMap) { vimperator.input.count = parseInt(countStr, 10); if (isNaN(vimperator.input.count))