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:
@@ -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;
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user