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

Backspace in Insert mode only deletes from one cursor #24

Closed JeppeLS closed 1 month ago

JeppeLS commented 6 months ago

When i press backspace in insert mode, the deletion only happen on my most recently added cursor, instead of all cursors. I'm on nvim v0.9.4

Here is a small example showing what i mean. Screencast from 2023-12-21 08-25-48.webm

brenton-leighton commented 6 months ago

Are you using the autopairs plugin? If not, can you tell me the output of this command:

:lua vim.print(vim.inspect(vim.fn.maparg("<Backspace>", "i", false, false)))

Edit: nvim-autopairs (or mini.pairs) can be disabled

erlonbie commented 2 months ago

Same issue, mine is:

v:lua.MPairs.autopairs_bs()

I seted the pre_hook and post_hook.

pre_hook = function()
    require('nvim-autopairs').disable()
end,

post_hook = function()
    require('nvim-autopairs').enable()
end,
brenton-leighton commented 2 months ago

Same issue, mine is:

v:lua.MPairs.autopairs_bs()

Can you show the output of the command before and after creating cursors? You could also use :verbose imap <BS> to print the mapping.

brenton-leighton commented 2 months ago

Also can you make sure nvim_autopairs is up to date? I don't think they use the MPairs global variable anymore.

It might be causing an issue that means multiple-cursors.nvim can't override the mapping.

brenton-leighton commented 2 months ago

@erlonbie I just realised I probably need to address you to notify you of a response

erlonbie commented 1 month ago

I just updated both plugins and the problem is gone, thank you! sorry for the miss report

brenton-leighton commented 1 month ago

No worries