Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vim commands ( :command ) dosn't take any affect #3049

Closed
DvirSadeh opened this issue Jan 26, 2021 · 1 comment · Fixed by #3066
Closed

vim commands ( :command ) dosn't take any affect #3049

DvirSadeh opened this issue Jan 26, 2021 · 1 comment · Fixed by #3066
Labels
A-input Area: Input management, keyboard layout, IME etc. A-vim Area: Vim/modal editing

Comments

@DvirSadeh
Copy link

Inserting vim commands (like :cd, :e, :term) do nothing. The little upper window appears when I insert :, and the autocomplete works, but after I press Enter nothing seems to happen.

  • macos Big Sur
  • oni2 v. 0.5.9-nightly | 0f1bf1e (the same issue appeared on different builds in the last two weeks at least)

Logs: trace.log

@bryphe bryphe added A-input Area: Input management, keyboard layout, IME etc. A-vim Area: Vim/modal editing labels Jan 29, 2021
@bryphe
Copy link
Member

bryphe commented Jan 29, 2021

Thanks for including the log, @DvirSadeh ! Was very helpful - I tracked down the issue to this configuration setting:

[INFO]  [ 0.470s] Oni2.Store.Vim : Running VimL from config: map <Enter> o<Esc>

It looks like the handling of map was incorrect, and in this case, it was running this binding when the command-line window was open - which would then cause the o<Esc> to be executed. This is a bug, since the map should only apply to normal/visual/select/operator pending modes.

bryphe added a commit that referenced this issue Jan 30, 2021
__Issue:__ In #3049 , the `:map <Enter> o<Esc>` was being utilized even in command-line mode.

__Defect:__ `:map` should only impact normal/visual/select/operator-pending modes, and not impact insert/command-line modes.

__Fix:__ Correct the condition for the `:map` command. In addition, while looking through the logs, I realized we were missing trace logging of keybindings, so implement that as well.

Fixes #3049
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-input Area: Input management, keyboard layout, IME etc. A-vim Area: Vim/modal editing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants