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 when deleteForward is repeated rapidly #2691

Open
pbwolf opened this issue Jan 4, 2025 · 0 comments
Open

Paredit garbles when deleteForward is repeated rapidly #2691

pbwolf opened this issue Jan 4, 2025 · 0 comments
Labels
bug Something isn't working paredit Paredit and structural editing

Comments

@pbwolf
Copy link

pbwolf commented Jan 4, 2025

When I rapidly repeat deleteForward, a Clojure editor that begins valid-with-respect-to-Paredit can become invalid.

Rapidity is the key, and ordinary keyboard auto-repeat is sufficient. I have not seen the problem when using deleteForward sedately, 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 clojure_core.clj included with VS Code's test data. Go to the beginning of line 1725, defmacro defmulti. Hold down the delete key for a while. Soon, parens will start turning red or double-quotes will be mismatched. For example, at one point I got the following:

({'(
  :added "1.0"}

where evidently a closing paren is missing; the final closing brace is highlighted red.

The behavior is non-deterministic.

pbwolf added a commit to pbwolf/calva that referenced this issue Jan 4, 2025
@bpringe bpringe added paredit Paredit and structural editing bug Something isn't working labels Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working paredit Paredit and structural editing
Projects
None yet
Development

No branches or pull requests

2 participants