diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-09-30 22:51:18 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-09-30 22:51:18 +0900 |
commit | 567b696cecbec870c36f5a07dd02fb5d9f9efb9b (patch) | |
tree | c31ac48d3da4dfe9801c85d9a954bc112df87a88 /src/actions | |
parent | 6551420e1ae0e91201de72e862e918dd3c97ab43 (diff) |
redux in console
Diffstat (limited to 'src/actions')
-rw-r--r-- | src/actions/completion.js | 22 | ||||
-rw-r--r-- | src/actions/index.js | 5 |
2 files changed, 27 insertions, 0 deletions
diff --git a/src/actions/completion.js b/src/actions/completion.js new file mode 100644 index 0000000..1ffb025 --- /dev/null +++ b/src/actions/completion.js @@ -0,0 +1,22 @@ +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/index.js b/src/actions/index.js index 7b79864..2aa28fa 100644 --- a/src/actions/index.js +++ b/src/actions/index.js @@ -9,4 +9,9 @@ export default { INPUT_KEY_PRESS: 'input.key,press', INPUT_CLEAR_KEYS: 'input.clear.keys', INPUT_SET_KEYMAPS: 'input.set,keymaps', + + // Completion + COMPLETION_SET_ITEMS: 'completion.set.items', + COMPLETION_SELECT_NEXT: 'completions.select.next', + COMPLETION_SELECT_PREV: 'completions.select.prev' }; |