mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 23:47:57 +01:00
fixed :noremap which was broken after last commit
This commit is contained in:
@@ -995,6 +995,9 @@ vimperator.Events = function () //{{{
|
|||||||
else
|
else
|
||||||
map = vimperator.mappings.get(vimperator.mode, candidateCommand);
|
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)
|
// 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))
|
if (/^[1-9][0-9]*$/.test(vimperator.input.buffer + key))
|
||||||
{
|
{
|
||||||
@@ -1020,10 +1023,9 @@ vimperator.Events = function () //{{{
|
|||||||
|
|
||||||
tmp.execute(null, vimperator.input.count, key);
|
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)
|
// 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);
|
vimperator.input.count = parseInt(countStr, 10);
|
||||||
if (isNaN(vimperator.input.count))
|
if (isNaN(vimperator.input.count))
|
||||||
|
|||||||
Reference in New Issue
Block a user