Skip to content

Commit

Permalink
Fix #2604: Ex command binding fails (#2713)
Browse files Browse the repository at this point in the history
__Issue:__ Binding to some ex commands - like `:enew` - aren't working as expected. In the `:enew` case, no buffer is opened.

__Defect:__ The effects are being ignored, so there is no buffer transition

__Fix:__ Re-use the effect logic in `VimStoreConnector` to handle this (use the `VimExecuteCommand` action).

Fixes #2604
  • Loading branch information
bryphe committed Nov 14, 2020
1 parent 984c460 commit d80edd5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Store/KeyBindingsStoreConnector.re
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ let start = maybeKeyBindingsFilePath => {
);

let executeExCommandEffect = command =>
Isolinear.Effect.create(~name="keybindings.executeExCommand", () =>
ignore(Vim.command(command): (Vim.Context.t, list(Vim.Effect.t)))
Isolinear.Effect.createWithDispatch(
~name="keybindings.executeExCommand", dispatch =>
dispatch(Actions.VimExecuteCommand(command))
);

let updater = (state: State.t, action: Actions.t) => {
Expand Down

0 comments on commit d80edd5

Please sign in to comment.