diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-05-25 21:33:33 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-05-25 21:33:33 +0900 |
commit | ccbe08cf66e16084c919f0b2fa2da81258c01d41 (patch) | |
tree | 3257d852aeae93e4dc84fd3cabb63ebeefef326d /src/shared | |
parent | 03370301a7509af4bbc96d60269598bf89c71fe4 (diff) |
Repeat last operation
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/operations.ts | 11 |
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); |