aboutsummaryrefslogtreecommitdiff
path: root/src/console
diff options
context:
space:
mode:
Diffstat (limited to 'src/console')
-rw-r--r--src/console/console.js10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/console/console.js b/src/console/console.js
index f83f79c..25ab36d 100644
--- a/src/console/console.js
+++ b/src/console/console.js
@@ -1,6 +1,7 @@
import './console.scss';
import * as backgroundActions from '../actions/background';
import * as consoleActions from '../actions/console';
+import * as commandActions from '../actions/command';
import Completion from './completion';
import consoleReducer from '../reducers/console';
@@ -10,13 +11,6 @@ var completion = null;
var completionOrigin = "";
let state = consoleReducer(undefined, {});
-const keydownMessage = (input) => {
- return {
- type: 'vimvixen.command.enter',
- value: input.value
- };
-};
-
const handleBlur = () => {
return browser.runtime.sendMessage(consoleActions.hide());
};
@@ -58,7 +52,7 @@ const handleKeydown = (e) => {
case KeyboardEvent.DOM_VK_ESCAPE:
return input.blur();
case KeyboardEvent.DOM_VK_RETURN:
- return browser.runtime.sendMessage(keydownMessage(e.target));
+ return browser.runtime.sendMessage(commandActions.exec(e.target.value));
case KeyboardEvent.DOM_VK_TAB:
if (e.shiftKey) {
completePrev();