Closed reach-satori closed 1 year ago
On further inspection, this seems to be a neovim bug: the weird bytes come through with just a plain call to getchar() as well, with curly braces.
Glad you were able to find out the source of the issue, feel free to re-open this if there's anything that needs to be done on my end.
Link to neovim issue:
As a workaround, we can use aliases or setup new surroundings = { ... }
, e.g.:
use({
"kylechui/nvim-surround",
tag = "*", -- Use for stability; omit to use `main` branch for the latest features
config = function()
local config = require("nvim-surround.config");
require("nvim-surround").setup({
-- surrounds = {
-- ["<S-{>"] = configDefault.surrounds["{"],
-- ["<S-}>"] = configDefault.surrounds["}"]
local configDefault = config.default_opts
-- },
aliases = {
["<S-{>"] = "{",
["<S-}>"] = "}"
}
})
end
})
Checklist
:h nvim-surround
to see if there might be any relevant information there?Neovim Version
Plugin Version
Tagged (Stable)
Minimal Configuration
Sample Buffer
any
Keystroke Sequence
ysiw{
Expected behavior
{any}
Actual behavior
any
Additional context
Weird bug I came across. The curly brace surround (and only the curly brace surround, apparently) refuses to work under xterm. I tested xfce4-terminal and there it works with no problem whatever the config. Additionally, a very similar thing, also only with curly braces, happens when using vim-surround, except instead of just failing to work, it adds the following special-character gibberish: ü}surrounded_wordü}
The bug happens identically on two computers I tested.