1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 11:18:00 +01:00

Fallback to count of parent mapping in motion maps. 2dw == d2w == 8d2w.

This commit is contained in:
Kris Maglione
2011-08-05 17:00:28 -04:00
parent f502617a84
commit a3aa33d0d3
2 changed files with 4 additions and 2 deletions

View File

@@ -540,8 +540,10 @@ var Editor = Module("editor", {
function addMotionMap(key, desc, select, cmd, mode) { function addMotionMap(key, desc, select, cmd, mode) {
mappings.add([modes.OPERATOR], [key], mappings.add([modes.OPERATOR], [key],
desc, desc,
function ({ count, motion, command }) { function ({ count, motion }) {
modes.push(modes.OPERATOR, null, { modes.push(modes.OPERATOR, null, {
count: count,
leave: function leave(stack) { leave: function leave(stack) {
if (stack.push) if (stack.push)
return; return;

View File

@@ -231,7 +231,7 @@ var KeyProcessor = Class("KeyProcessor", {
countStr: "", countStr: "",
command: "", command: "",
get count() this.countStr ? Number(this.countStr) : null, get count() this.countStr ? Number(this.countStr) : this.main.params.count,
append: function append(event) { append: function append(event) {
this.events.push(event); this.events.push(event);