kylechui / nvim-surround

Add/change/delete surrounding delimiter pairs with ease. Written with :heart: in Lua.
MIT License
3.16k stars 63 forks source link

fix(utils): ensure chars is a table in ipairs #192

Closed XXiaoA closed 1 year ago

XXiaoA commented 1 year ago

I add aliases ["f"] = "f" and then nvim-surround will throw bad argument #1 to 'ipairs' (table expected, got string) if we use change and delete operations

kylechui commented 1 year ago

I will be fixing this; however, IMO this should be done during config translation as opposed to real-time processing in utils

kylechui commented 1 year ago

Actually upon a second glance this is more complicated than I had initially thought; I'm going to open up a new branch for my changes. Thanks for the fix!