-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
Backspace is not working properly in the output window #700
Comments
I'm unable to reproduce. What's your OS? And what version of Calva are you on? In version 2.0.110 backspacing through the prompt is not allowed. I also see a space being added after your evaluation result, which doesn't happen for me. |
I see now that you're saying the disabling of backspace is not being respected after deleting the empty list. But again, I cannot repro. =( |
It's interesting that the whole buffer seems to break the syntax highlighting... What other extensions are you using? I've seen Clover conflicting. |
I can reproduce this. Very interesting! |
When deleting the empty list, all trailing spaces in the window are deleted. My mind is blown. |
I can reproduce now too. Weird. |
And now I can't reproduce it any longer. So strange! |
@PEZ, @bpringe, I've found the source of the problem. This behavior occurs because Calva formats the entire file, which happens in two cases:
I can send a pull request if you point me in the right direction to fix this 😄 |
Ah, yes, that makes sense! I was looking at the wrong place... So, many paredit commands finish with formatting and probably we (implicitly or explicitly) tell the formatter to trim trailing whitespace. Iirc there is a special case for when formatting is performed on the top level. Or, rather, for selecting what is to be formatted. A check there for if it is the output file could maybe stop this madness. Also trimming trailing whitespace is generally a bad idea in this window. PR is super welcome. Please don't hesitate to ask us for help. |
@glebovmaksim Great find! Looks like you're looking in the right places already, though I haven't messed with the formatting much myself. @PEZ Maybe when formatting, if it's the repl file, we should only format up to the previous prompt? |
Sometimes it deletes the prompt itself. Here is the gif.
Was surprised that it actually worked on the first expression, but after trying to remove an empty brackets it started to fail every time.
The text was updated successfully, but these errors were encountered: