-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Disable cursor positioning with mouse in normal mode #4405
Comments
Not sure this is really possible with the current VSCode API. The closest we could get, I think, would be using a second cursor for the selection, but then we'd need to ignore this cursor and its selection for most commands and try to counter-act VSCode's operations on it. Frankly, I'm not sure the result would be very satisfying and would add significant complexity to the code base. |
@J-Fields Selecting Selecting text with the mouse isn't really a big deal (not worth it if it will add a lot of complexity with not very good results) as I (and I assume most others) will use visual modes to select text. Mainly the cursor repositioning is important, hopefully this can be done without adding too much complexity to the code base. |
+1 coming from vim, this is very frustrating. But because of this issue that workflow pattern breaks :( |
Similarly, but different, I don't mind my cursor moving about while in normal mode, but it's really annoying for me when mouse events reposition the cursor while I'm in insert mode. This is because I use primary selection a lot. When middle-click pasting, I don't want to have to click in the exact right place to make it work (the cursor warps before pasting occurs). I don't have the same issue with focusing and raising windows (because focus follows mouse, and I'm using a tiling WM), but I understand you'd have the same problem otherwise (if you use click to focus and you left your editor in insert mode while changing windows). |
Disable cursor positioning with mouse in normal mode which is a important UX.... we need this feature. |
This behaviour is very frustrating, being obliged to super carefully middle click on the line you activated the insert (vim mode) to properly paste. |
I am facing the opposite issue. I don't know why but my cursor position does not update when I click at some other location in normal mode. When I go back to insert mode, the cursor goes back to where it was before click. I do not want this |
Same here. About one week ago before I updated my VSCode and its plugins, everything was fine, the cursor followed my mouse and keyboard consecutively, I've been long used to it. So please, provide us with the option to choose our preferences. |
Just chiming in that having the cursor "lie" about its current location after mouse-clicking is incredibly unintuitive. This behavior changed sometime in the last couple weeks as it was working as expectedly before. What is really weird is that some movement commands will move the cursor in its current location instead of reverting to the previous location -- horizontal movements (hjwb etc) use the previous location, but if you click and then use vertical movement (jk), the cursor will behave as expected, and update its "real" location so that you can then use horizontal movement. I would guess my explanation is not very clear, if a video is needed to better illustrate what is happening please let us know. |
Also facing this issue. Is there any option how to revert this!? |
As a temporary solution downgrade to 1.16.0 helped me: https://www.vsixhub.com/vsix/38553/. You can install it using this command: |
the opposite happened to me in version To summarize, I think set mouse=a " Enable mouse usage (all modes) in terminals
set mouse=v " Visual mode It would be nice to have this as a "mouse option" in Settings. Once downgrading to |
@Pivert As for the rest of the people having issues after version 1.17.0 there is now a new version 1.17.1 that might fix some of the issues you're facing. Try updating to that one and see if it works now. |
This appears to be fixed in |
strangely the behavior requested in #5212 is not how vim works at all... the behavior asked for here, is, however. |
Hi, I guess I have a new problem now with |
I’ve also noticed some weird behavior when using change-word and change-to-letter commands in the latest version where a seemingly random character will be removed several words away from where my cursor is. I haven’t been able to nail down exactly what scenarios cause it but if I can figure that out I’ll be happy to log a more detailed report. None of these problems were present prior to 1.17 - I have to wonder what issue in the vim plugin needed fixing that has resulted in these repeated regressions against expected behavior. |
Both your situations are probably related to #5221 and might be fixed with PR #5250. If any of you can test that PR please post your feedback on that PR thread. |
Is your feature request related to a problem? Please describe.
Whenever I want to focus my editor I use the mouse and randomly click inside it. Doing this repositions the cursor. I'd rather it just reactivate the editor and keep the cursor at the line it was at before and then use vim commands to navigate the file. Basically the same behaviour when using the mouse with vim in terminal.
Describe the solution you'd like
Mouse clicks inside the editor (whilst in normal) mode does not change the cursor location.
Describe alternatives you've considered
Using the keyboard shortcut to focus the editor. Not really a fan of the shortcut and I frequently use the mouse when navigating the file explorer within vscode.
Additional context
Selecting text should still work. If you're having trouble understanding the behaviour i'm describing open your terminal and run vim on a text file and use the mouse inside.
The text was updated successfully, but these errors were encountered: