Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paredit garbles while backspacing rapidly #2611

Open
pbwolf opened this issue Sep 1, 2024 · 0 comments
Open

Paredit garbles while backspacing rapidly #2611

pbwolf opened this issue Sep 1, 2024 · 0 comments

Comments

@pbwolf
Copy link

pbwolf commented Sep 1, 2024

When I backspace quickly, a document that begins valid-with-respect-to-Paredit can become invalid.

Rapidity (e.g., ordinary keyboard auto-repeat) is the key. I have not seen the problem when backspacing more slowly, such as once per second. Furthermore, the problem seems more severe with relatively big documents on relatively feeble computers. The more powerful the computer or the smaller the clj file, the less likely the problem.

To reproduce the problem: Open a clj or cljs file that is well-formed with respect to Paredit. Position the cursor at a point from which you can backspace a lot. Hold down the backspace key and allow it to auto-repeat. Soon, parens will start turning red or double-quotes will be mismatched.

To reproduce the problem on a pretty good machine, I started with Calva's src/cljs-lib/test/pez_rewrite_clj/paredit_test.cljs (simply because it was already large-ish), Selected-all, and Pasted numerous times until the buffer's length was about 20,000 lines. Then I positioned the cursor near the middle of the file, after a top-level form, and held down the Backspace key. On a more modest virtual machine with 8g memory and 4 cpus, a quite average clj file of a few hundred lines is enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant