Open Chuck321123 opened 8 months ago
That it doesnt remove both of the brackets in the last move
Yo @Chuck321123, That's really weird; Can you tell me what things you tried - I'd recommend starting with the basics like doing a --reset
and maybe a reinstall or do goto Tools
--> Reset Spyder to factory defaults
if you don't wanna do and full reinstall or a line command such as --reset
as mentioned earlier.
Thanks
@GitKia1392 I have tried that as well, but as far as I can remember, this probem has existed since day 1 of installing Spyder. This problem also occurs in Linux Ubuntu
Hi @Chuck321123, thanks for the clear report. It's quite easy to reproduce the behaviour your reported, and I agree that is it is not desirable. The more difficult issue is, how can Spyder easily decide whether it should delete both brackets or only one?
I don't know exactly why this feature was introduced, but one situation in which Spyder probably should probably delete both brackets is you type on an empty line: f
(
BACKSPACE
. After the (
, Spyder automatically inserts the closing parenthesis so the line now shows f()
with the cursor between the parentheses. I think it makes sense for Spyder to then delete both parenthesis after the backspace, so that the backspace undoes what the (
keypress added before.
It might also be the Windows or Ubuntu OSes issue as maybe your PC/laptop might've ran into a problem while trying to delete the last )
; If you have Ubuntu I'd say it might be compatibility issue, It might be even be the Python. I personally think its the cause of Spyder trying to like auto help u like as in where u do )
it auto makes it ()
, so it might be as well be considered for this.
For @jitseniesen, I'd recommend to leave this issue open for future users who might occur this issue.
Thanks
Issue Report Checklist
Checklist checked
Problem Description
So this problem is a bit hard to explain so i recorded the problem. If you have inner brackets next to an outer layer of brackets and remove the inner brackets, the removal of the last inner bracket will cancel out with the outer bracket where you remove two brackets with the backspace instead of 1. This also holds true for paratheses and curvy brackets. A solution will of course be to just remove 1 bracket at a time with the backspace in this scenario.
What steps reproduce the problem?
https://github.com/spyder-ide/spyder/assets/123987501/18509bfb-4ff4-4815-81be-1f77878d226a
What is the expected output?
That it doesnt remove both of the brackets in the last move
Versions
Dependencies