support w/W command

jh-changes
Shin'ya Ueoka 7 years ago
parent 940f3c7f79
commit d262fd1a2f
  1. 6
      src/background/actions/operation.js
  2. 2
      src/shared/default-settings.js
  3. 1
      src/shared/operations.js

@ -42,6 +42,12 @@ const exec = (operation, tab) => {
return sendConsoleShowCommand(tab, 'tabopen ' + tab.url); return sendConsoleShowCommand(tab, 'tabopen ' + tab.url);
} }
return sendConsoleShowCommand(tab, 'tabopen '); return sendConsoleShowCommand(tab, 'tabopen ');
case operations.COMMAND_SHOW_WINOPEN:
if (operation.alter) {
// alter url
return sendConsoleShowCommand(tab, 'winopen ' + tab.url);
}
return sendConsoleShowCommand(tab, 'winopen ');
case operations.COMMAND_SHOW_BUFFER: case operations.COMMAND_SHOW_BUFFER:
return sendConsoleShowCommand(tab, 'buffer '); return sendConsoleShowCommand(tab, 'buffer ');
default: default:

@ -7,6 +7,8 @@ export default {
"O": { "type": "command.show.open", "alter": true }, "O": { "type": "command.show.open", "alter": true },
"t": { "type": "command.show.tabopen", "alter": false }, "t": { "type": "command.show.tabopen", "alter": false },
"T": { "type": "command.show.tabopen", "alter": true }, "T": { "type": "command.show.tabopen", "alter": true },
"w": { "type": "command.show.winopen", "alter": false },
"W": { "type": "command.show.winopen", "alter": true },
"b": { "type": "command.show.buffer" }, "b": { "type": "command.show.buffer" },
"k": { "type": "scroll.lines", "count": -1 }, "k": { "type": "scroll.lines", "count": -1 },
"j": { "type": "scroll.lines", "count": 1 }, "j": { "type": "scroll.lines", "count": 1 },

@ -3,6 +3,7 @@ export default {
COMMAND_SHOW: 'command.show', COMMAND_SHOW: 'command.show',
COMMAND_SHOW_OPEN: 'command.show.open', COMMAND_SHOW_OPEN: 'command.show.open',
COMMAND_SHOW_TABOPEN: 'command.show.tabopen', COMMAND_SHOW_TABOPEN: 'command.show.tabopen',
COMMAND_SHOW_WINOPEN: 'command.show.winopen',
COMMAND_SHOW_BUFFER: 'command.show.buffer', COMMAND_SHOW_BUFFER: 'command.show.buffer',
// Scrolls // Scrolls