diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2021-07-04 13:40:18 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-04 13:40:18 +0900 |
commit | 750d92e57e48d5b3614a97558ed8c43ce0351474 (patch) | |
tree | 80fa47ec452813b579fd7919d8f32337f272c6e9 /src/console/completion/hooks.ts | |
parent | 63a129d2d6fab68784e902476dd9d6d5f563036a (diff) | |
parent | 6b88c15d1a6193cd090c5a1ae9b6ea06a467e171 (diff) |
Merge pull request #1194 from ueokande/dependabot/npm_and_yarn/prettier-2.3.2
Bump prettier from 2.2.1 to 2.3.2
Diffstat (limited to 'src/console/completion/hooks.ts')
-rw-r--r-- | src/console/completion/hooks.ts | 53 |
1 files changed, 18 insertions, 35 deletions
diff --git a/src/console/completion/hooks.ts b/src/console/completion/hooks.ts index c3940c7..4402b70 100644 --- a/src/console/completion/hooks.ts +++ b/src/console/completion/hooks.ts @@ -246,49 +246,30 @@ export const useCompletions = () => { return; } - getOpenCompletions( - cmd.command, - cmd.args, - completionTypes - ).then((completions) => - dispatch(actions.setCompletions(completions)) + getOpenCompletions(cmd.command, cmd.args, completionTypes).then( + (completions) => dispatch(actions.setCompletions(completions)) ); break; case Command.Buffer: - getTabCompletions( - cmd.command, - cmd.args, - false - ).then((completions) => - dispatch(actions.setCompletions(completions)) + getTabCompletions(cmd.command, cmd.args, false).then( + (completions) => dispatch(actions.setCompletions(completions)) ); break; case Command.BufferDelete: case Command.BuffersDelete: - getTabCompletions( - cmd.command, - cmd.args, - true - ).then((completions) => - dispatch(actions.setCompletions(completions)) + getTabCompletions(cmd.command, cmd.args, true).then( + (completions) => dispatch(actions.setCompletions(completions)) ); break; case Command.BufferDeleteForce: case Command.BuffersDeleteForce: - getTabCompletions( - cmd.command, - cmd.args, - false - ).then((completions) => - dispatch(actions.setCompletions(completions)) + getTabCompletions(cmd.command, cmd.args, false).then( + (completions) => dispatch(actions.setCompletions(completions)) ); break; case Command.Set: - getPropertyCompletions( - cmd.command, - cmd.args - ).then((completions) => - dispatch(actions.setCompletions(completions)) + getPropertyCompletions(cmd.command, cmd.args).then( + (completions) => dispatch(actions.setCompletions(completions)) ); break; } @@ -314,12 +295,14 @@ export const useCompletions = () => { export const useSelectCompletion = () => { const state = React.useContext(CompletionStateContext); const dispatch = React.useContext(CompletionDispatchContext); - const next = React.useCallback(() => dispatch(actions.selectNext()), [ - dispatch, - ]); - const prev = React.useCallback(() => dispatch(actions.selectPrev()), [ - dispatch, - ]); + const next = React.useCallback( + () => dispatch(actions.selectNext()), + [dispatch] + ); + const prev = React.useCallback( + () => dispatch(actions.selectPrev()), + [dispatch] + ); const currentValue = React.useMemo(() => { if (state.select < 0) { return state.completionSource; |