vim --clean, I insert these lines:
One Two Three Four Five Six
Then I do:
:set mouse=a :nnoremap <Esc><Esc> <Nop>
(From my observations, the mapping could be to anything.
:nnoremap <Esc><Esc> :echom "Hello"<CR> would work just as well for this demonstration).
- I position the cursor on the first column of the first line.
- Then, I input (but not Enter) something in the command line area (e.g.
- At this point, I press EscEsc, and I use my mouse to click on
Six(the last line in the buffer).
Surprise: the cursor is positioned on the third line (
Three)! What could be the reason for such a strange behavior?
Even more intriguing, doing
:nnoremap ; : and repeating the steps above does not move the cursor at all! Instead, something like
:2;6M would be displayed in the echo area. It seems that the format of the echoed message is: colon, followed by the column number of the mouse click, semicolon, followed by the line number of the mouse click, then an uppercase letter M.