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

Bug (Master): Mapping + Operator + jump to non existing mark screws up vscodevim #5057

Closed
sql-koala opened this issue Jul 20, 2020 · 3 comments · Fixed by #4735
Closed

Bug (Master): Mapping + Operator + jump to non existing mark screws up vscodevim #5057

sql-koala opened this issue Jul 20, 2020 · 3 comments · Fixed by #4735

Comments

@sql-koala
Copy link
Contributor

sql-koala commented Jul 20, 2020

Describe the bug
Using an operator (d'x) with a jump to a non existing mark screws up vscodevim, because textinput changes to the command line.
Just a jump is no problem. It gives an error message and you can continue.

It is probably connected to the remapper in combination with a failing motion.

See screenshot for the problem:

To Reproduce
Steps to reproduce the behavior:

-1. Build from master
0. have a mapping like nnoremap dw daw

  1. open a document
  2. do: d'x
  3. See expected error message
  4. but text focus will change to command line and vim is unuseable (restart required)

Can you repro?

Another way to provoke the error, do: dg? in step 2.

Screenshots
image

Environment (please complete the following information):

  • Extension (VsCodeVim) version: master
  • VSCode version: 1.47.2
  • OS: windows 7 64
@sql-koala sql-koala changed the title Bug: Operator + jump to non existing mark screws up vscodevim Bug (Master): Mapping + Operator + jump to non existing mark screws up vscodevim Jul 20, 2020
@berknam
Copy link
Contributor

berknam commented Jul 21, 2020

I've noticed this bug a lot of times already when doing the remapper refactor. It is not the text input that changes to the command line, that is just the 'showCmd' you're seeing. The thing is it gets stuck continuously waiting for another key. Also this only happens with operators that you have remaps that start with that operator key.

I've found a workaround so that you don't have to restart vscode, just select something with your mouse (or double click) and then press <Esc> twice and it should get back to a working state.

I didn't create an issue for this yet because this is fixed with my remapper refactor. So I guess this is another issue to put on the list! 😄

@berknam berknam mentioned this issue Jul 21, 2020
10 tasks
@sql-koala
Copy link
Contributor Author

Ah, ok. Thanks for the detailed explanation @berknam .

@berknam
Copy link
Contributor

berknam commented Jul 21, 2020

You can keep this open until the PR gets merged. Because I'm sure there are others facing this issue as well and if they come here they don't have to create a new issue and they can see the workaround (so they are not restarting vscode every time).

J-Fields pushed a commit that referenced this issue Aug 16, 2020
This is a pretty massive change; see pull request #4735 for full details

Most notably:
- Support for operator-pending mode, including remaps and a half-cursor decoration
- Correct handling of ambiguous remaps with timeout
- Correct handling of recursive special case when the RHS starts with the LHS
- Correct handling of multi-key remaps in insert mode
- Failed movements that occur partway through a remap stop & discard the rest of the remap
- Implement `unmap` and `mapclear` in .vimrc

Refs #463, refs #4908
Fixes #1261, fixes #1398, fixes #1579, fixes #1821, fixes #1835
Fixes #1870, fixes #1883, fixes #2041, fixes #2234, fixes #2466
Fixes #2897, fixes #2955, fixes #2975, fixes #3082, fixes #3086
Fixes #3171, fixes #3373, fixes #3413, fixes #3742, fixes #3768
Fixes #3988, fixes #4057, fixes #4118, fixes #4236, fixes #4353
Fixes #4464, fixes #4530, fixes #4532, fixes #4563, fixes #4674
Fixes #4756, fixes #4883, fixes #4928, fixes #4991, fixes #5016
Fixes #5057, fixes #5067, fixes #5084, fixes #5125
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants