diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2021-06-14 23:14:51 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2021-07-05 21:32:43 +0900 |
commit | 65cf6f0842d8d5933dc13b3767b1baf398d68cd5 (patch) | |
tree | df9a8b139fd98adb79f075ba655d1303bdf3fd1d /src/shared | |
parent | caced372415a944c4297157397d0027ba629fff0 (diff) |
Implement FindNextOperator
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/messages.ts | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/shared/messages.ts b/src/shared/messages.ts index 2ad3b48..8b9e598 100644 --- a/src/shared/messages.ts +++ b/src/shared/messages.ts @@ -35,6 +35,10 @@ export const MARK_JUMP_GLOBAL = "mark.jump.global"; export const TAB_SCROLL_TO = "tab.scroll.to"; +export const FIND_NEXT = "find.next"; +export const FIND_PREV = "find.prev"; +export const FIND_CLEAR_SELECTION = "find.clear.selection"; + export const ADDON_ENABLED_QUERY = "addon.enabled.query"; export const ADDON_ENABLED_RESPONSE = "addon.enabled.response"; export const ADDON_TOGGLE_ENABLED = "addon.toggle.enabled"; @@ -68,7 +72,7 @@ export interface ConsoleEnterCommandMessage { export interface ConsoleEnterFindMessage { type: typeof CONSOLE_ENTER_FIND; - text?: string; + keyword?: string; } export interface ConsoleShowCommandMessage { @@ -222,6 +226,20 @@ export interface TabScrollToMessage { y: number; } +export interface FindNextMessage { + type: typeof FIND_NEXT; + keyword: string; +} + +export interface FindPrevMessage { + type: typeof FIND_PREV; + keyword: string; +} + +export interface FindClearSelection { + type: typeof FIND_CLEAR_SELECTION; +} + export interface AddonEnabledQueryMessage { type: typeof ADDON_ENABLED_QUERY; } @@ -299,6 +317,9 @@ export type Message = | MarkSetGlobalMessage | MarkJumpGlobalMessage | TabScrollToMessage + | FindNextMessage + | FindPrevMessage + | FindClearSelection | AddonEnabledQueryMessage | AddonEnabledResponseMessage | AddonToggleEnabledMessage @@ -333,6 +354,9 @@ export const valueOf = (o: any): Message => { case MARK_SET_GLOBAL: case MARK_JUMP_GLOBAL: case TAB_SCROLL_TO: + case FIND_NEXT: + case FIND_PREV: + case FIND_CLEAR_SELECTION: case ADDON_ENABLED_QUERY: case ADDON_ENABLED_RESPONSE: case ADDON_TOGGLE_ENABLED: |