Atom 1.20.1 Line tab moving when editing line in Python - Mac OS High Sierra


#1

When I’m editing Python code, I’m experiencing a recurring problem when the line tab moves if I click on the line and edit. I have included the OS and version details in the headline. Here is a video showing what is happening. The code is a nested loop, but the line is in the correct place before I try to edit it. Strangely the editor is moving the line back to be inline with a ‘while’ loop when it is correctly aligned in a ‘if/elif’ sequence. This also happens with ‘try/except’ sequences. Not sure why it’s happening. Any suggestions? I love ATOM IDE, but this is annoying!

Video :slight_smile:


#2

Not related to your problem, but is there a reason you’re four versions behind the current Atom? Most attempts to fix a bug start by updating to the most recent version.

Additionally, does the problem reproduce in safe mode? Because Atom doesn’t do much itself, so the issue is much more likely to be caused by a third party package you have.


#3

Thanks, I’ll update and let you know!! Appreciate! I think I turnips off updates because it’s a development machine!


#4

Were you able to reproduce the problem in safe mode? You did not need to upgrade to test that per se, as the bug should not have been happening even in that version of Atom. I strongly suspect something has gone wrong with a community package you have.


#5

I updated to 1.24 and still doing it. I only have two community packages which are minimap and minimap select. I’m restarting now and will check in safe mode, but recent update is installing for High Sierra. Also, I’ll reset any key bindings to default just in case. ATOM does try to auto format tabs for Python right? I will try another file as well and see if it reproduces. Maybe something strange about this file.

Joseph Lee
M.B.A Technology and Innovation Management. - National Chung-Hsing University

B.A. Anthropology - University of Saskatchewan

Phone: 647-486-5229

Personal Email: joseph.lee.esl@gmail.com

Company Email: joseph@ripplesoftware.ca

Website: www.ripplesoftware.ca


#6

I don’t see why safe mode would do anything. I thought it was related to an autoformatting problem with ATOM. However, I never use safe-mode. Have not needed it in 15 years.

Joseph Lee
M.B.A Technology and Innovation Management. - National Chung-Hsing University

B.A. Anthropology - University of Saskatchewan

Phone: 647-486-5229

Personal Email: joseph.lee.esl@gmail.com

Company Email: joseph@ripplesoftware.ca

Website: www.ripplesoftware.ca


#7

Safe mode is not for normal use. Rather, it’s to determine whether an issue is being caused by a builtin Atom package, or a community package.

You may think the problem is with Atom, but we won’t know for sure until you reproduce it in safe mode. If you can, it’s a problem with Atom. If you can’t, you have a package doing something it shouldn’t.


#8

If the issue does persist in safe mode, the next step would be to provide a copy of your the relevant parts of code (or a link to it) that allows someone else to reproduce the issue.

It need not be the actual code (e.g., if it is sensitive), but it does need to be a minimum (not) working example that a straight copy and paste can be done on to reproduce the behaviour.

If posting it here, please don’t forget to fence it in ```. This ensures all spacing and characters are shown verbatim, and none is interpreted as markdown.


#9

I uninstalled all community packages restarted and still persisted. I tried similar on another Ubuntu machine running ATOM and it was repeatable. It’s only on saved Python files (foo.py). Unsaved files or text files to not cause this. It has something to to with tab spacing auto-format for Python in the core package. Try with the following code which was reproducible on Ubuntu and Mac. Type the simple following code. When I type the colon on the ‘except’ line, it pushes the except back one tab. Happens on Ubuntu and Mac for saved .py files. There are other problems similar to this for if/else statements as well. :slight_smile: Let me know if it is reproducible for you as well!

‘’'item_array = [1,2]

for item in item_array:

try: foo = bar

except: foo = 2
’’’

Joseph Lee
M.B.A Technology and Innovation Management. - National Chung-Hsing University

B.A. Anthropology - University of Saskatchewan

Phone: 647-486-5229

Personal Email: joseph.lee.esl@gmail.com

Company Email: joseph@ripplesoftware.ca

Website: www.ripplesoftware.ca


#10

As I was saying, you didn’t need to do this. That is what safe mode is for.

That is not properly fenced. You need to use backticks, not speech marks. You can tell it works by looking at the preview. It seems you are doing this through email though, which means you probably can’t see a preview.


#11

I tested your code anyway though, and was unable to reproduce the issue in safe mode. I was however able to reproduce in a normal window, which suggests the issue is from a package we both have installed. Further testing just now confirms the issue is with the MagicPython package. The next step now would be to raise an issue on their repository (if one doesn’t already exist) and let a maintainer take over from there.


#12

Thanks for confirmation!

Joseph Lee
M.B.A Technology and Innovation Management. - National Chung-Hsing University

B.A. Anthropology - University of Saskatchewan

Phone: 647-486-5229

Personal Email: joseph.lee.esl@gmail.com

Company Email: joseph@ripplesoftware.ca

Website: www.ripplesoftware.ca