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

Using mouse in insert mode causes VIM to think it is in normal mode #2410

Closed
kjgoodrick opened this issue Mar 2, 2018 · 12 comments
Closed

Comments

@kjgoodrick
Copy link

Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT

What happened: When in insert mode using the mouse to move the cursor causes the cursor to switch to block and the mode "changes" to normal; however, VIM is actually in insert and as soon as any letter is pressed the mode "switches" to insert and the character(s) are inserted. If the user settings file is open the cursor behaves as expected.

What did you expect to happen: Stay in insert mode, cursor remains a line and moves to clicked location. This happens if the user settings file is open.

How to reproduce it (as minimally and precisely as possible): be in insert mode click anywhere else in the document.

This has also been reported by christiangenco here (Includes a video).

Environment:

  • Extension Name: vim
  • Extension Version: 0.11.0
  • OS Version: Windows_NT x64 10.0.16299
  • VSCode version: 1.20.1
{
	"activationTimes": {
		"startup": true,
		"codeLoadingTime": 283,
		"activateCallTime": 2,
		"activateResolvedTime": 19,
		"activationEvent": "*"
	}
}
@christiangenco
Copy link

I've been having the same bug and it's driving me absolutely crazy. Here's a screen recording of it happening to me.

No joke I feel like I'm having a stroke every time it happens.

@Chillee
Copy link
Member

Chillee commented Mar 9, 2018

I can't seem to reproduce this. Could you confirm that something we did in the last release didn't somehow fix it?

@jpoon
Copy link
Member

jpoon commented Mar 9, 2018

Can't repro on my end with 0.11.0

@ivanvoznyakovsky
Copy link

ivanvoznyakovsky commented Mar 9, 2018

this is fixed in last release of the extension but the fix introduced another bug. now when you in insert mode and change cursor position by clicking status bar is blinking showing normal mode and than going back to insert mode.

@christiangenco
Copy link

christiangenco commented Mar 10, 2018

@ivanvoznyakovsky's bug is happening to me too (and was happening before 0.11.2).

Here's another video of it happening. Again, strangely, it's fixed if I open the settings window.

The only key I hit in the video is "a". When the editor says it's in "NORMAL" mode and shows a block cursor, it isn't actually in normal mode, because hitting "a" inserts an "a" character in the second to last position in the line instead of appending.

Here are the plugins and versions I have installed:

screen shot 2018-03-10 at 5 30 19 pm

I've gone back to Atom because of this bug, but I'll hold out and switch back if it gets fixed :/

@kjgoodrick
Copy link
Author

I am also no longer experiencing this bug. Thanks!

@ivanvoznyakovsky
Copy link

no idea why but have it all the time today. both blinking of status bar and block cursor in insert mode.

@christiangenco
Copy link

I've still got it, even after uninstalling all other plugins.

@dmolokanov
Copy link

Any updates on this issue yet? It's really annoying one when swap back and forth between vscode and neovim.
I have vim.mouseSelectionGoesIntoVisualMode = true in my settings

  1. When I'm in normal mode and select a text with double click on word on select with mouse drag it puts editor in visual mode as expected.
  2. When I'm in insert mode and do the same it still preserves insert mode

@berknam
Copy link
Contributor

berknam commented Dec 3, 2020

@dmolokanov What you are mentioning is a different issue #5716, it is better fixed with SelectMode that is not implemented yet but is being worked on.

As for the original problem of this issue, I can't reproduce it and I don't think it is a problem anymore. So I'm closing this one. But if anyone is still experiencing this issue feel free to comment and we will reopen if needed.

@berknam berknam closed this as completed Dec 3, 2020
@fadedbee
Copy link

fadedbee commented Dec 13, 2023

I'm also seeing this. Provided I keep the setting tab open, I can freely select text with the mouse. The broken mouse-selection behaviour only started this morning. I've not made any vscode IDE changes, as far as I can recall. I googled the issue and found #1871 which then led me to this, when I set vim.mouseSelectionGoesIntoVisualMode = true.

@fadedbee
Copy link

fadedbee commented Dec 13, 2023

Sorry, probably not a vscodevim bug. I've disabled vscodevim, restarted vscode and I still get the same problem: the current word is dimly selected all over the file, but nothing else when I drag the mouse with the left-button held down.

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

8 participants