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

1.17.[0/1] Regression: VSCode find now enters Visual mode, it should remain in Normal mode #5495

Open
conoremclaughlin opened this issue Oct 27, 2020 · 12 comments

Comments

@conoremclaughlin
Copy link

conoremclaughlin commented Oct 27, 2020

Describe the bug
VSCode's native find now enters Visual mode, it should remain in Normal mode. I've downgraded to 1.16.0 to get around it.

To Reproduce
Steps to reproduce the behavior:

  1. Use VSCode's find (cmd+f for MacOSX) for any search term

Expected behavior
It should remain in normal mode. Similar to how / works for Vim's native search

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.17.1
  • VSCode version: 1.50.1
  • OS: Mac OSX Catalina 10.15.5
@conoremclaughlin conoremclaughlin changed the title VSCode find now enters Visual mode, it should remain in Normal mode 1.17.[0/1] Regression: VSCode find now enters Visual mode, it should remain in Normal mode Oct 27, 2020
@ronakg
Copy link

ronakg commented Oct 28, 2020

Issue #5491 might be related.

@berknam
Copy link
Contributor

berknam commented Oct 30, 2020

This happens because recently a change was made so that every time vscode creates a selection Vim goes to visual mode. This is needed so you can have commands and keybindings like 'editor.action.smartSelect.grow' put you in visual mode as expected. In normal VIM the same thing happens, every time some action results in a selection VIM changes to visual mode. The same thing happens now on this extension. The problem is that there are a lot of situations that vscode creates a selection when it wasn't necessary, like when jumping in a peek window as mentioned in #5249.

The same thing happens when using vscode find, vscode selects the found word so Vim goes to visual mode. Usually when you're finding a word you intend to do something with it like copying it or replacing it and you can do that in visual mode with 'y', 'c' or even append to the word with 'A'.

Maybe this change could be behind a user setting to give the option to the user.

@Madd0g
Copy link

Madd0g commented Nov 3, 2020

+1 I'm also suffering from new problems due to this (mac).

  • while having a search (made with cmd+f) and having some text selected due to the searching, jumping to the end of the line (cmd+right) results in horrible cursor behavior (can't barely even explain where it's going, to some other previous line that had the text I was searching for)

@berknam
Copy link
Contributor

berknam commented Nov 3, 2020

+1 I'm also suffering from new problems due to this (mac).

* while having a search (made with cmd+f) and having some text selected due to the searching, jumping to the end of the line (cmd+right) results in horrible cursor behavior (can't barely even explain where it's going, to some other previous line that had the text I was searching for)

That is a different issue that should be fixed on the next version.

@rexkyng
Copy link

rexkyng commented Nov 29, 2020

same problem here
downgraded to 1.16.0 helps

@rpavlovs
Copy link

+1 for putting it behind a flag

@sql-koala
Copy link
Contributor

sql-koala commented Feb 17, 2021

I wanted to try vscode Find and ran in this issue, too.

@berknam I don't know the technical detail of your PR (meaning: are the more situations where we want to capture new selection). If selection.grow is the main use case, could we not create a simple wrapper around it?
Meaning: we own the keypress, call the selection.grow command and set visualMode.

Like: export class ActionOverrideCmdD extends BaseCommand

@seriiserii825
Copy link

same problem here
downgraded to 1.16.0 helps

And how to downgrade to 1.16.0?

@rexkyng
Copy link

rexkyng commented Apr 20, 2021

same problem here
downgraded to 1.16.0 helps

And how to downgrade to 1.16.0?

under "Uninstall" select "Install Another Version"

@TarasIvaschuk
Copy link

Downgrading is not a solution, because prior to 1.16. version operatorPendingModeKeyBindings not working (

@darrelhong
Copy link

PS. An easy workaround is to change the editor.findMatchBackground and editor.findMatchBorder (if desired) colours to be not fully opaque. You can do so by specifying a 8-digit hex colour where the last two characters represent the alpha channel.

@DemianParkhomenko
Copy link

Is there any solution for this issue besides the downgrade? Is this issue actual?

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

No branches or pull requests