-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Inserting a line-break in code/comment with parenthesis deletes part of the code/comment #4475
Comments
Thanks for reporting. We'll see what we can do about this in a future release. |
It turns out this isn't just limited to comments. I had the following:
I put my cursor just before the closing parenthesis after "strStationProjectPath" and hit enter and I end up with this (notice the closing parenthesis disappeared):
If I put my cursor in front of "with" and hit backspace forever, I end up with this:
It should join the second line with the first line, but there's something stopping it from backspacing any further. So there's some kinda weirdness going on that has to do with parenthesis and indentation. Subject has been updated to indicate that isn't just limited to comments. Let me know if you need any more info. Thanks! |
So.. more weirdness. I'm not sure if this issue is only limited to parenthesis. Take this line of code:
Which I know isn't legitimate code (I'm porting a script over from VBScript). Put your cursor to the right of the three quotes that are just to the left of "-renderproject", hit backspace, and you end up with this:
Notice how there is only one quote to the left of "-renderproject" - and no, I did not hit backspace twice. |
@rlaverde, please take a look at this one too. |
Here's another one for you. Type the following:
spyder will autocomplete and you will end up with the following (with the cursor between the parenthesis):
hit enter You'd expect something like this:
But you get this:
If you try and press backspace, it will move back once (about two spaces worth), but if you backspace again, it won't do anything. Btw, I am using tabs, not spaces, for my indentation. Let me know if you need any more testing. |
Here's another weird one. If I have the following (notice the missing colon after fOutFile):
and I place my cursor in front of #1 and hit tab, I end up with the following:
|
Description of your problem
I have a comment that is too long so I want to break it into two lines - this comment also contains parenthesis which seems to be causing the bug. I go to where I want to break it and when I hit enter, it chops off some of the text from the line that is moved down a row. Removing the parenthesis stops the strange behavior. The example should explain it.
What steps will reproduce the problem?
place your cursor just in front of "pulling" and hit enter
you will end up with this:
What is the expected output? What do you see instead?
It should insert a clean line break, properly tabbed. Backspace should be able to merge it with the previous line.
Please provide any additional information below
Versions and main components
Dependencies
Please go to the menu entry
Help > Optional Dependencies
(orHelp > Dependencies
), press the buttonCopy to clipboard
and paste the contents below:
jedi >=0.9.0 : 0.9.0 (OK)
matplotlib >=1.0 : 2.0.0 (OK)
nbconvert >=4.0 : 4.2.0 (OK)
numpy >=1.7 : 1.11.3 (OK)
pandas >=0.13.1 : 0.19.2 (OK)
pep8 >=0.6 : 1.7.0 (OK)
pyflakes >=0.6.0 : 1.5.0 (OK)
pygments >=2.0 : 2.1.3 (OK)
pylint >=0.25 : 1.6.4 (OK)
qtconsole >=4.2.0: 4.2.1 (OK)
rope >=0.9.4 : 0.9.4-1 (OK)
sphinx >=0.6.6 : 1.5.1 (OK)
sympy >=0.7.3 : 1.0 (OK)
The text was updated successfully, but these errors were encountered: