folke / edgy.nvim

Easily create and manage predefined window layouts, bringing a new edge to your workflow
Apache License 2.0
840 stars 17 forks source link

fix: High CPU Usage with Invalid Config #50

Closed danields761 closed 1 year ago

danields761 commented 1 year ago

Hello @folke,

I've created a pull request to fix a bug where Neovim chews up 100% of a CPU core when it encounters an invalid configuration.

The bug seems to be in edgy.util.with_retry, where it doesn't increase the retries variable, causing endless loops of retries and high CPU usage.

I've committed a fix. This should properly deal with invalid configurations and prevent Neovim from overloading the CPU.

Hope this helps out. Happy to chat more if needed!

Cheers, Daniil

folke commented 1 year ago

Thanks!