brenton-leighton / multiple-cursors.nvim

A multi-cursor plugin for Neovim that works in normal, insert/replace, or visual modes, and with almost every command
Apache License 2.0
152 stars 4 forks source link

Use virtualedit=onemore with custom functions #50

Closed brenton-leighton closed 3 months ago

brenton-leighton commented 3 months ago

Use virtualedit=onemore when calling a custom function so that the cursor is positioned correctly at EOL in insert mode. The cursor position has to be saved before enabling (and restored after disabling) onemore to workaround curswant being lost.