Author Topic: Python indent broken with latest hotfix ??  (Read 12075 times)

JeffB

  • Senior Community Member
  • Posts: 326
  • Hero Points: 14
Python indent broken with latest hotfix ??
« on: February 05, 2016, 03:13:30 AM »
Anyone else notice that selecting line(s) in Python code, and using the tab to indent to a new indention level doesn't work?  Shift-tab (to de-indent) works fine.  If the line is not selected, and just at the beginning of the text, the tab key works fine.

Anyone else notice this?  I think it broke with the most recent hotfix, but I'm not sure.

Jeff

rajkej

  • Senior Community Member
  • Posts: 344
  • Hero Points: 14
Re: Python indent broken with latest hotfix ??
« Reply #1 on: February 05, 2016, 02:23:35 PM »

rajkej

  • Senior Community Member
  • Posts: 344
  • Hero Points: 14
Re: Python indent broken with latest hotfix ??
« Reply #2 on: February 05, 2016, 02:41:05 PM »
After getting the insert working again regarding my previous post, I'm still having this issue too so this seems to be a separate issue.

I am having the same problem where doing line or column selection and trying to tab to the right, I can't get SE to indent the code for python files. Works fine for other file types I use.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1818
  • Hero Points: 151
Re: Python indent broken with latest hotfix ??
« Reply #3 on: February 05, 2016, 03:08:14 PM »
What emulation are you using?  Just popping in and checking with CUA, I can move selected lines with tab before and after the latest 20.0.1 hotfix.

rajkej

  • Senior Community Member
  • Posts: 344
  • Hero Points: 14
Re: Python indent broken with latest hotfix ??
« Reply #4 on: February 05, 2016, 03:09:51 PM »
I'm using CUA. You can get an example of my configs from the linked topic above. If that doesn't work, let me know and I can send you a copy of my current configs.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1818
  • Hero Points: 151
Re: Python indent broken with latest hotfix ??
« Reply #5 on: February 05, 2016, 05:53:50 PM »
I couldn't reproduce it with the config from the other thread.

rajkej

  • Senior Community Member
  • Posts: 344
  • Hero Points: 14
Re: Python indent broken with latest hotfix ??
« Reply #6 on: February 06, 2016, 02:24:49 PM »
Here's my setup that is causing this issue to happen

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1818
  • Hero Points: 151
Re: Python indent broken with latest hotfix ??
« Reply #7 on: February 08, 2016, 03:40:31 PM »
I can import that without import errors, but I don't seem to see the problem. 

Just to make sure I'm not doing this differently than you: When you select the lines for the case that doesn't work, what type of selection does the status bar at the bottom say it is?  (usually it's something like "3 LINES" or "2x1 BLOCK" or "3 Cols")

JeffB

  • Senior Community Member
  • Posts: 326
  • Hero Points: 14
Re: Python indent broken with latest hotfix ??
« Reply #8 on: February 08, 2016, 05:14:40 PM »
For me (on my config, not the one added in this thread, it's just "X Lines"

So if I select a single line ("1 Lines" is shown).  If I hit tab, the cursor is moved from col 0 to col 4 (where the actual text starts), but the overall effect on the line is nil (only the cursor position moved).  If I select multiple lines, for the last line in the selection, the cursor jumps to col 12 (which is where the text/code starts on that line).

This behavior seems consistent with simply putting the cursor in the blank indented area (before a text/code line starts) and hitting tab.  The cursor jumps to the beginning of the text/code line (skipping all the blank indented area).

It seems like the selection is simply being ignored.  Keep in mind that shift-tab does un-indent though.

If I get a chance today, I'll try it with a fresh/blank config.

Jeff

JeffB

  • Senior Community Member
  • Posts: 326
  • Hero Points: 14
Re: Python indent broken with latest hotfix ??
« Reply #9 on: February 08, 2016, 05:50:54 PM »
I confirmed that the problem does not exist on a fresh config.  I don't have an older v20 exported options file to compare to the current one, so I don't know what may have changed.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1818
  • Hero Points: 151
Re: Python indent broken with latest hotfix ??
« Reply #10 on: February 08, 2016, 05:54:37 PM »
JeffB: Is the behavior just in Python for you, or can it happen in other languages? 

It's interesting because I see that if I uncheck the global "Indent selection when text selected" setting under "Editing -> Selections" I get behavior that seems to match what you're seeing, but that setting changes the behavior for all languages.   Not sure why I can dedent but not indent when that's unchecked, that seems like a bug.

JeffB

  • Senior Community Member
  • Posts: 326
  • Hero Points: 14
Re: Python indent broken with latest hotfix ??
« Reply #11 on: February 08, 2016, 06:04:50 PM »
It is just for Python (I tried a couple of others).  You are right about that option. I tried disabling it, which caused the other languages to stop indenting the selection.  Re-enabling it fixed those languages (as expected), but not Python.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1818
  • Hero Points: 151
Re: Python indent broken with latest hotfix ??
« Reply #12 on: February 08, 2016, 06:38:03 PM »
Ok, that at least gives me another idea of something to look for in the code. 

One more thing that might narrow it down:  In your regular config, if you exit slickedit, and then go to the config directory and just rename the vslick.sta (or vslick.stu file on linux) to something like vslick.bak and restart, does the problem still happen?

JeffB

  • Senior Community Member
  • Posts: 326
  • Hero Points: 14
Re: Python indent broken with latest hotfix ??
« Reply #13 on: February 08, 2016, 06:48:03 PM »
Patrick,
Yes.  vslick.stu was re-created, but it didn't affect the behavior.
Jeff

JeffB

  • Senior Community Member
  • Posts: 326
  • Hero Points: 14
Re: Python indent broken with latest hotfix ??
« Reply #14 on: February 08, 2016, 07:29:06 PM »
Patrick, I can PM you my exported config if you want.  I verified that importing it into a blank config re-creates the issue.  Also, whether related or not, 'indent-selection' still works correctly.