aboutsummaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-05-25 21:33:33 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2019-05-25 21:33:33 +0900
commitccbe08cf66e16084c919f0b2fa2da81258c01d41 (patch)
tree3257d852aeae93e4dc84fd3cabb63ebeefef326d /src/shared
parent03370301a7509af4bbc96d60269598bf89c71fe4 (diff)
Repeat last operation
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/operations.ts11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/shared/operations.ts b/src/shared/operations.ts
index 688c240..0f0d0c0 100644
--- a/src/shared/operations.ts
+++ b/src/shared/operations.ts
@@ -75,6 +75,9 @@ export const FIND_PREV = 'find.prev';
export const MARK_SET_PREFIX = 'mark.set.prefix';
export const MARK_JUMP_PREFIX = 'mark.jump.prefix';
+// Repeat
+export const REPEAT_LAST = 'repeat.last';
+
export interface CancelOperation {
type: typeof CANCEL;
}
@@ -291,6 +294,10 @@ export interface MarkJumpPrefixOperation {
type: typeof MARK_JUMP_PREFIX;
}
+export interface RepeatLastOperation {
+ type: typeof REPEAT_LAST;
+}
+
export type Operation =
CancelOperation |
AddonEnableOperation |
@@ -342,7 +349,8 @@ export type Operation =
FindNextOperation |
FindPrevOperation |
MarkSetPrefixOperation |
- MarkJumpPrefixOperation;
+ MarkJumpPrefixOperation |
+ RepeatLastOperation;
const assertOptionalBoolean = (obj: any, name: string) => {
if (Object.prototype.hasOwnProperty.call(obj, name) &&
@@ -441,6 +449,7 @@ export const valueOf = (o: any): Operation => {
case FIND_PREV:
case MARK_SET_PREFIX:
case MARK_JUMP_PREFIX:
+ case REPEAT_LAST:
return { type: o.type };
}
throw new TypeError('unknown operation type: ' + o.type);