anuvyklack / pretty-fold.nvim

Foldtext customization in Neovim
Apache License 2.0
441 stars 21 forks source link

Default binding for `h` and `l` causes non-responsive `PackerSync` #22

Closed axieax closed 1 year ago

axieax commented 2 years ago

Hi, it seems that the default keybinding for h and l (from pretty-fold.preview) causes the floating window for PackerSync (packer.nvim) to be non-responsive. j and k work fine however.

It seems like this causes an infinite loop in M.mapping.close_preview_open_fold(original), where original() causes this to be recursively called.

Frydac commented 2 years ago

It took me so long to find this, I had no idea at first it was the l or h keys that were causing this or a mapping at all. I just saw 100% cpu usage and nvim hanging. I tried profiling with :profile start but that doesn't work for lua stuff it seems, so I thought it was nvim itself at first. Sometimes it wouldn't happen for a day, sometimes every few minutes. Pretty sure it also happens for other filetypes/windows. At least I'm glad I found it now, after a few weeks of this, it was driving me crazy. Even a would not help every time, take many seconds to respond or even not at all, making me have to force close nvim and more than one time I borked the use of swapfiles and lost some work because of this.. smh

anuvyklack commented 2 years ago

Tried to fix this issue. Notify me if it happens again.

anuvyklack commented 2 years ago

No, it's still there.

anuvyklack commented 2 years ago

Should be fixed now.