atom-vim-mode-plus icon indicating copy to clipboard operation
atom-vim-mode-plus copied to clipboard

mouse clicks position command-mode cursor after end of line

Open thorstenhirsch opened this issue 8 years ago • 2 comments

In command mode the cursor is positioned 1 after the last character when clicking with the mouse behind the last character in a line. This behavior is reproducable with the latest vim-mode-plus package in atom-beta under Linux as well as macOS. The issue might be the same as https://github.com/atom/vim-mode/issues/579 in the old/deprecated vim-mode.

Expected behavior in command mode: the cursor is positioned on the last character when clicking with the mouse behind the last character in a line (same as keyboard shortcut $).

When using keyboard shortcuts or cursors the behavior is correct in command mode; the cursor is never being positioned after the last character of a line, it's always on the last character. Also not that the behavior of insert mode is correct - there we want the cursor to be positioned right after the last character when clicking with the mouse behind the last character in a line.

  • Atom version info(atom --version) Atom : 1.14.0-beta0 Electron: 1.3.13 Chrome : 52.0.2743.82 Node : 6.5.0

  • vim-mode-plus version 0.79.1

  • You disabled vim-mode? You cannot use both vim-mode and vim-mode-plus simultaneously. Yes.

  • Tried to latest stable atom version with latest vim-mode-plus. Well, latest beta as you can see. And latest vim-mode-plus.

  • Restarting Atom itself solve your problem? No.

  • Keybinding issue? Read this. No keybinding issue.

  • If you follow Ideal issue reporting, it's great!

thorstenhirsch avatar Jan 13 '17 12:01 thorstenhirsch

I know this issue and original vim-mode's fix. I intentionally removed that fix, since it too much when compared with complexity it's fix introduced and the benefit of that fix. I'm not perfectionist for mouse part. vim-mode-plus is just a wrapper working on top of atom. My priority for the mouse issue fix is very low. Pls understand this issue as limitation.

t9md avatar Jan 13 '17 12:01 t9md

Two years late, but you already have code for it. Pressing escape after putting it at the end of the line moves it left to where it should be. Wouldn't be hard for you (or anyone else, in their own config) to quick throw in a mouse listener and then if in normal mode 'vim-mode-plus:reset-normal-mode'.

IsaacElenbaas avatar Jun 29 '19 23:06 IsaacElenbaas