aboutsummaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/completion.js22
-rw-r--r--src/actions/console.js26
-rw-r--r--src/actions/index.js10
3 files changed, 26 insertions, 32 deletions
diff --git a/src/actions/completion.js b/src/actions/completion.js
deleted file mode 100644
index 733f516..0000000
--- a/src/actions/completion.js
+++ /dev/null
@@ -1,22 +0,0 @@
-import actions from 'actions';
-
-const setItems = (groups) => {
- return {
- type: actions.COMPLETION_SET_ITEMS,
- groups,
- };
-};
-
-const selectNext = () => {
- return {
- type: actions.COMPLETION_SELECT_NEXT
- };
-};
-
-const selectPrev = () => {
- return {
- type: actions.COMPLETION_SELECT_PREV
- };
-};
-
-export { setItems, selectNext, selectPrev };
diff --git a/src/actions/console.js b/src/actions/console.js
index ba1fbeb..4183489 100644
--- a/src/actions/console.js
+++ b/src/actions/console.js
@@ -7,6 +7,19 @@ const showCommand = (text) => {
};
};
+const showError = (text) => {
+ return {
+ type: actions.CONSOLE_SHOW_ERROR,
+ text: text
+ };
+};
+
+const hide = () => {
+ return {
+ type: actions.CONSOLE_HIDE
+ };
+};
+
const setCompletions = (completions) => {
return {
type: actions.CONSOLE_SET_COMPLETIONS,
@@ -14,17 +27,18 @@ const setCompletions = (completions) => {
};
};
-const showError = (text) => {
+const completionNext = () => {
return {
- type: actions.CONSOLE_SHOW_ERROR,
- text: text
+ type: actions.CONSOLE_COMPLETION_NEXT,
};
};
-const hide = () => {
+const completionPrev = () => {
return {
- type: actions.CONSOLE_HIDE
+ type: actions.CONSOLE_COMPLETION_PREV,
};
};
-export { showCommand, setCompletions, showError, hide };
+export {
+ showCommand, showError, hide, setCompletions, completionNext, completionPrev
+};
diff --git a/src/actions/index.js b/src/actions/index.js
index 4e8d4a7..6a64795 100644
--- a/src/actions/index.js
+++ b/src/actions/index.js
@@ -1,9 +1,11 @@
export default {
// console commands
- CONSOLE_SHOW_COMMAND: 'vimvixen.console.show.command',
- CONSOLE_SET_COMPLETIONS: 'vimvixen.console.set.completions',
- CONSOLE_SHOW_ERROR: 'vimvixen.console.show.error',
- CONSOLE_HIDE: 'vimvixen.console.hide',
+ CONSOLE_SHOW_COMMAND: 'console.show.command',
+ CONSOLE_SET_COMPLETIONS: 'console.set.completions',
+ CONSOLE_SHOW_ERROR: 'console.show.error',
+ CONSOLE_HIDE: 'console.hide',
+ CONSOLE_COMPLETION_NEXT: 'console.completion.next',
+ CONSOLE_COMPLETION_PREV: 'console.completion.prev',
// User input
INPUT_KEY_PRESS: 'input.key,press',