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

Editor: Decrease Line Indentation uses tab-size not spaces-per-indent #1744

Closed
mikewyer opened this Issue Jun 23, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@mikewyer

mikewyer commented Jun 23, 2016

Short Summary

Decrease Line Indentation removes all the whitespace from the start of the line, when it should only remove one indentation level.

Steps to Reproduce

Bind a key to Editor: Decrease Line Indentation (Ctl-c, < or shift-TAB or ctrl-shift-TAB)
In python mode (also happens in Python3 mode and perl mode), type out the following snippet:

def foo():
  if True:
    print 'bar'
    print 'done'

Hit shift-TAB (or whatever) to decrease the indent of the last line

Expected results

def foo():
  if True:
    print 'bar'
  print 'done'
## << 2 spaces above these 

Actual results

def foo():
  if True:
    print 'bar'
print 'done'
## ^^ no spaces at all :(

Platform Information

Komodo Edit or IDE? IDE
Komodo Version? 10.0.1
Operating System (and version)?
Ubuntu 14.04.4 (Trusty)

Additional Information

-- eg. Error logs, screenshots, workarounds --

@mitchell-as

This comment has been minimized.

Member

mitchell-as commented Jun 23, 2016

Hi, what are your indentation settings? What happens when you press "Tab" on a new line? Does it insert 2 spaces or 4 spaces?

@mikewyer mikewyer changed the title from Editor: Decrease Line Indentation removes *all* indentation to Editor: Decrease Line Indentation uses tab-size not spaces-per-indent Jun 24, 2016

@mikewyer

This comment has been minimized.

mikewyer commented Jun 24, 2016

The bug was raised with 'Prefer Tab characters' disabled, with indents set at 2 spaces and tab characters set at 8.

I've since tried setting indents at 12 spaces and get this:

def bar():
            if False:
                        print 'way over here'
                print 'after shift-TAB or ctl-c, <'

So it seems that Decrease-Indentation operates on the tab-size setting, not the 'spaces per indent' setting. I've updated the title accordingly.

At least that means I can set them both to the same value to continue editing sanely.

This is a regression in Komodo X. Komodo 9 works as expected (using spaces-per-indent when reducing indentation level).

@mitchell-as mitchell-as added this to the 10.1 milestone Jun 24, 2016

@mitchell-as mitchell-as self-assigned this Jun 24, 2016

@mitchell-as

This comment has been minimized.

Member

mitchell-as commented Jun 24, 2016

Thanks very much for the extra information. Confirmed as a regression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment