issues with `<c-r>` after the recent update
Since the recent breaking change, when I try to redo some changes, the prompt opens up in the bottom left corner (see the image) and there are no highlights. This type of prompt has never appeared before.
The basic functionality and mechanism for undo and redo did not change. I have no idea what triggers this... Are you using any other plugins? Can you try disabling them and see if this persists? Can you also please check if one of your global options triggers this?
The one strange thing that I found in the short time I was testing this (I deleted all of the plugins I use except oil.nvim and highlight-undo) is the following:
- open a folder in neovim (with something like
nvim .) - if the file is opened then there are no problems 2.1. if using oil.nvim then I get the prompt from my first comment 2.2. if using netrw then I get this:E81: Using <SID> not in a script context - all of this happens only if highlight-undo is lazy-loaded, but if highlight-undo isn't lazy-loaded then it doesn't work at all (doesn't show highlights) about 50% of the time
This is my config:
return {
{
"tzachar/highlight-undo.nvim",
-- event = "VeryLazy",
lazy = false,
opts = {
duration = 300,
keymaps = {
Paste = { disabled = true },
paste = { disabled = true },
},
},
},
}
Note that I didn't have that much time to test this more thoroughly, it could be another issue.
@tzachar probably something similar to #28 (I provided a bit more context/info there)
Can you try to load the plugin last, after all other plugins?
If you are using lazy.nvim, try loading the plugin using the keys option and see if this persists
Can you try to load the plugin last, after all other plugins? If you are using
lazy.nvim, try loading the plugin using thekeysoption and see if this persists
I'm sorry for not getting back to you sooner. I tried to load it last and it works as expected.
Can you be a bit more specific? what did you change? So I can add to the Readme..
Here is my config (using lazy):
return {
{
"tzachar/highlight-undo.nvim",
keys = { { "u" }, { "<C-r>" } },
opts = {
duration = 300,
keymaps = {
paste = { disabled = true },
Paste = { disabled = true },
},
},
},
}