neovim-mac icon indicating copy to clipboard operation
neovim-mac copied to clipboard

Pasted text is inserted behind insertion point

Open sfsam opened this issue 3 years ago • 1 comments

In Insert Mode, if I have ABC in my buffer with the insertion point right after the C and I do command-V to paste D I get ABDC whereas I expected to get ABCD

sfsam avatar Mar 08 '21 19:03 sfsam

Confirmed, thanks for the bug report!

The menu items are essentially vim mappings, paste (Cmd-V) in insert mode maps to Ctrl-O "+gP, which clearly doesn't work correctly. A better mapping might be Ctrl-R Ctrl-O + that would handle the paste / cursor correctly. Or if we want insert mode pastes to be auto-indented we can use Ctrl-R Ctrl-R +. I'll investigate if MacVim auto-indents pastes in insert mode and match their behavior.

JaySandhu avatar Mar 10 '21 16:03 JaySandhu