Author Topic: Automatic file reloads turning off "Indent with tabs"  (Read 910 times)

StephenW

  • Senior Community Member
  • Posts: 197
  • Hero Points: 21
Automatic file reloads turning off "Indent with tabs"
« on: April 18, 2021, 07:46:48 AM »
SlickEdit 25.0.1.0 running as root on Ubuntu 20.04

I am working on a project in Python 3 where the original author used tabs in the source file.  The default setting for the Python language settings (Formatting > Edit > Indent with tabs) is off, and I had not changed that.  I have my Python 3 version of the code in a .py file and the old Python 2 version in a .py2 file, and I had manually turned on the "Indent with tabs" option on both files.  So I was very surprised after adding a few lines of code when I got a Python error saying it had bad indenting, and on checking found that it was caused by the indenting being done with spaces.  When I checked the "Indent with tabs" options on both files, it was off, so I just assumed I had forgotten to turn it on.

But then, after running the code again, I once again got the same problem when adding a new line of code.  After a while, I worked out that the "Indent with tabs" option was turning off by itself whenever I ran a test of the Python code which wrote new log files.  After the test, when I switched back to SlickEdit from the terminal window, SlickEdit was asking to reload the altered log files.  If I told it to go ahead and reload the log files, the "Indent with tabs" option on both Python files got turned off.  If I chose to cancel the reloads, the "Indent with tabs" options remained set.

Further, I discovered that if I change the default setting for Python language files to "Indent with tabs" on, the problem does not happen.  So that is what I have done for now.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1818
  • Hero Points: 151
Re: Automatic file reloads turning off "Indent with tabs"
« Reply #1 on: April 19, 2021, 01:28:33 PM »
This is definitely a bug.  We'll put in a fix for the next hotfix for this.    Thanks for the report.