From 3bb157c84c9757b5808c8316009d8ec84d7f0f85 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Tue, 29 Aug 2017 21:58:12 +0900 Subject: buffer by b command --- src/background/key-queue.js | 1 + src/content/index.js | 3 +++ src/shared/actions.js | 2 ++ 3 files changed, 6 insertions(+) (limited to 'src') diff --git a/src/background/key-queue.js b/src/background/key-queue.js index 3805305..d7f0984 100644 --- a/src/background/key-queue.js +++ b/src/background/key-queue.js @@ -4,6 +4,7 @@ const DEFAULT_KEYMAP = { ':': [ actions.CMD_OPEN ], 'o': [ actions.CMD_TABS_OPEN, false ], 'O': [ actions.CMD_TABS_OPEN, true ], + 'b': [ actions.CMD_BUFFER ], 'k': [ actions.SCROLL_LINES, -1 ], 'j': [ actions.SCROLL_LINES, 1 ], '': [ actions.SCROLL_LINES, -1 ], diff --git a/src/content/index.js b/src/content/index.js index 66b1121..710fbda 100644 --- a/src/content/index.js +++ b/src/content/index.js @@ -24,6 +24,9 @@ const invokeEvent = (action) => { vvConsole.showCommand('open '); } break; + case actions.CMD_BUFFER: + vvConsole.showCommand('buffer '); + break; case actions.SCROLL_LINES: scrolls.scrollLines(window, action[1]); break; diff --git a/src/shared/actions.js b/src/shared/actions.js index cd740c2..7151dd1 100644 --- a/src/shared/actions.js +++ b/src/shared/actions.js @@ -1,5 +1,6 @@ export const CMD_OPEN = 'cmd.open'; export const CMD_TABS_OPEN = 'cmd.tabs.open'; +export const CMD_BUFFER = 'cmd.buffer'; export const TABS_CLOSE = 'tabs.close'; export const TABS_REOPEN = 'tabs.reopen'; export const TABS_PREV = 'tabs.prev'; @@ -32,6 +33,7 @@ const BACKGROUND_ACTION_SET = new Set([ const CONTENT_ACTION_SET = new Set([ CMD_OPEN, CMD_TABS_OPEN, + CMD_BUFFER, SCROLL_LINES, SCROLL_PAGES, SCROLL_TOP, -- cgit v1.2.3