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
Bug: backspace (structural editing) occasionally "hangs" #2299
Comments
Thanks for reporting! When it happens, does the problem go away without reload of the VS Code window? |
The backspaces happen -- just a few seconds later than when they were typed -- and then it's fine and responsive for a while... until it randomly happens again later in the day. |
I saw something similar happen today, but only once and I didn't have the patience to wait it out so I reloaded the VS Code window. Since it happens so frequently for you, @seancorfield, could you consider running with a month-old or so version of Calva and maybe that can help us understand if it seems to be newly introduced by a change in Calva? |
I'm on vacation next week (working on OSS stuff) so if it happens with sufficient frequency while I'm doing that, I'll work my way back through Calva versions and see if I can determine a "stable" version. Because it's intermittent, it's hard to know whether a given version "works" or not but I'll see what I can do. |
I'm having the same issue. Pressing backspace totally freezes the environment. I restarted the |
I have the suspicion that there is a relation to having lots of output to the terminal or REPL. When clearing the terminal and REPL frequently, the issue seems to occur much less often. Not sure if that makes sense... |
@eliascotto I somehow doubt that clojure-lsp is involved in the problem. I could be wrong, but you can try holding off a bit with restarting clojure-lsp and see if the issue fixes itself for a while. If it doesn't, and you can fix it by restarting clojure-lsp, then we should be considering that as a factor. Please let us know how you fare! @mkreis It does make sense, and could be a factor. Are you experiencing it outside REPL window? I think there might be structural editor code that runs on the output window content even when it is not being edited. I might have that wrong though. |
@PEZ yes, mainly the editor is affected. Also I tried to restart clojure-lsp, but nothing happens, only "Activating extensions..." is shown in the footer |
@PEZ I have another observation which occurs during all those instances as well: I was editing code and caused unbalanced brackets due to deletion (select and delete). This cause some bright yellow brackets (I guess that is the highlighting for unmatched) and the backspace key did not work. |
Thanks, @mkreis. That could be what's going on. That we have changed something making the structural editor lock up on unbalance. (Or that something has changed under our feet causing this, but let's be optimists for now.) |
@mkreis I see this with well-formed code so I don't think that is the issue (it may be worse with ill-formed code but I can't say I've noticed). I see it in projects with very small Calva output windows too (my current project has only 110 lines in the output window -- again, it may be worse in projects with much larger output windows but I can't say I've noticed). @PEZ I haven't had a chance to run older versions of Calva to test against yet this week -- I've mostly been editing documentation -- sorry. |
No worries! Anyone and everyone that can reproduce the problem: Please consider testing some older version of Calva to help see if the problem might have been introduced lately. |
Today it blocked for ~1min until I restarted the
This bug is a bit annoying since if I keep pressing the backspace again, and move the cursor, it mess up the code when it finally execute the keyboard action. |
Thanks, @eliascotto ! Maybe it is something todo with clojure-lsp after all... Even if I can't quite imagine how that could cause these symptoms... Maybe you can try with an older version of clojure-lsp and see if that changes anything. I don't think we had this issue a month ago. |
I could reproduce the issue with Calva version 2.0.386. Will now switch to 2.0.385. |
Also reproducible with 2.0.385, will switch to 2.0.384 now. |
It could be that we should be testing with different versions of clojure-lsp. That's decoupled from Calva versions. |
Okay. It's also reproducible with 2.0.384. I'll switch to latest of Calva now and use older clojure-lsp versions. |
Reproducible with |
...and reproducible with |
Reproducible with clojure-lsp |
Happening on |
Can someone who can reproduce this, run Calva with clojure-lsp disabled for a while? Also, what extensions are you people using? |
The quickest way I know of to produce a list of the enabled extensions is to:
NB: For 1. remember to replace |
Happens with My extensions list
|
The structural editor is involved in both backspace and |
I'm not sure how related, but here is a gist with what could be a reproduction freezing Calva: https://gist.github.com/ingydotnet/5b97cc4e503d705633e9c59c05d7154d Any help with testing and refining the repro is highly appreciated! 🙏 ❤️ |
OK. So here's a build of Calva with potential for fixing this: Please give it a spin!
|
Hi there everyone! I am hoping that the latest release, v2.0.392, fixes this. Please let me know if you agree or if the issue is still there. |
I'm editing code and start typing a symbol or I'm typing into a string, realize I've mistyped and try to backspace but nothing happens -- I can type more characters but cannot backspace -- and then after a brief period my backspaces suddenly take effect at wherever the cursor happens to be at that point.
It's very odd. I can click elsewhere in the file. I can move the cursor with the arrow keys. Typing anything except backspace seems to work fine. And then those "missing" backspaces get actioned at the (new) cursor position.
It's a fairly recent phenomenon and it happens randomly between a few and maybe half a dozen times a day.
The text was updated successfully, but these errors were encountered: