Skip to content

Commit

Permalink
Don't translate termcodes twice on input
Browse files Browse the repository at this point in the history
`getcharstr()` already returns raw internal termcodes, it is wrong to
call nvim_replace_termcodes on its result.

This effectively reverts PR kylechui#273

refs: neovim/neovim#29034
fixes: kylechui#325
  • Loading branch information
bew committed May 30, 2024
1 parent fa5b365 commit f797e1c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lua/nvim-surround/input.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ M.get_char = function()
if not ok or char == "\27" then
return nil
end
-- Call this function, because config.translate_opts() does too
return vim.api.nvim_replace_termcodes(char, true, true, true)
return char
end

-- Gets a string input from the user.
Expand Down

0 comments on commit f797e1c

Please sign in to comment.