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
Mouse fails to set cursor position at end of line in command mode #1469
Comments
Confirmed on Windows 7 and Ubuntu 16.04. Left mouse button down = correct caret position, button up/release = move back one character. Seems like a bug in the built in |
I have observed another detail. First you have to bring the cursor in the situation described above (click past last char once, then do it again). When you save the document now (if doesn't matter if you had changes or not), the cursor jumps back to the actual position after a short period of time. Just thought I'd share my observation. Hope it helps. |
me too. was driving me crazy. It turns out that hitting 'Esc' key, when there's nothing to 'escape' from (eg, Package Panel, Console etc) enters or 'turns on' Vintage Mode (a vi emulator or 'command mode'). |
Keys in the User settings always overwrite the corresponding key from the Default settings file. |
Summary
When
command_mode
is active, using the mouse to change the cursor position does not work as expected in a certain case. This case is when clicking on the very last clickable position in a line, i.e. on the newline character.It seems like the mouse click is unable to set the actual cursor position but succeeds in setting the rendered cursor position in this case.
I've already posted about this in the forums. Here's the link: https://forum.sublimetext.com/t/command-mode-cursor-jumps-back/23733
Expected behavior
When clicking beyond the last character in a line with the mouse, i.e. on the newline character, the cursor should jump and stay to the left of the newline character. Trying to insert a new character at that point should insert it before the newline character, just like when the cursor is anywhere else on that line. Also, when leaving command mode, the cursor should stay where it is.
Actual behavior
When clicking beyond the last character in a line with the mouse, i.e. clicking on the newline character, the cursor should jump to the left of the newline character. However, the cursor then jumps to the left by one textpoint. Clicking on the same spot again, the cursor appears to be in the correct position.
Steps to reproduce
view.settings().set('command_mode', True)
view.settings().set('command_mode', False)
Environment
The text was updated successfully, but these errors were encountered: