justinbarclay / parinfer-rust-mode

Simplifying how you write Lisp
https://shaunlebron.github.io/parinfer/
GNU General Public License v3.0
227 stars 16 forks source link

emacs freezes when opening a file with a large number of UTF-8 characters #78

Closed ST-Saint closed 5 months ago

ST-Saint commented 5 months ago

The file agda-input.el

Reproduced with emacs -Q

GNU Emacs 30.0.50 Development version d95f2a882d5f on master branch; build date 2024-03-15.

justinbarclay commented 5 months ago

Hey, thanks for reporting this.

I tried running parinfer-rust on this buffer and I was able to replicate your issue.

I've added a hidden variable to do things the fast way, which improves the editing speed in agda-input.el. However, when running this, I noticed that parinfer-rust also freaked out on this file. I think it might be related to parinfer-rust either being confused by the formatting in that file in general or that multi-byte chars sometimes cause issues.

I also pushed up a change that should prevent parinfer-rust-mode from completely freezing when swapping buffer contents.