64-bit Cygwin, Win10, nothing special about my installation. Start vim cleanly inside a mintty window running bash (updated my installation today): /usr/bin/vim --clean -u /dev/nul test.txt Insert the following string: "pIppp" Copy that string into the paste buffer using the mouse and ctrl-insert. Insert the following string on the next line: "(char *) " Then press shift-insert to paste. You should get: "(char *) pIppp" This is normal behavior. Press escape and then ":set sm cp" and press enter  Vim is now in compatible mode and showmatch is turned on. Insert the following string on the next line: "(char *) " Then press shift-insert to paste.  You should get the same string.  However, I get: "Ppp(char *)" It seems like at least an ESC character is inserted, so the mode gets changed from insert to command.  This can be really destructive if you have a long buffer. The showmatch mechanism is required to reproduce this bug. Is this bug a Cygwin, vim, mintty, or something else bug? Thanks,Kevin PS Yes, I use compatible mode because I am that old.