[issue29339] Interactive: Move to same indentation level as previousline

12345 67890 report at bugs.python.org
Thu Feb 2 16:13:57 EST 2017


12345 67890 added the comment:

The user is going to have to outdent anyway if we return them to the previous indentation level. Essentially it would be this:


[ENTER]

set_cursor_to_previous_indentation_level()

if first_char_in_is_space:
    erase_first_char_in()
    reset_cursor_to_zero_indentation()
    type_first_char()
else:
    pass


So if we have this line:

        some_line

[ENTER]

        some_line
        ^

[BACKSPACEX4]

        some_line
    ^
<---- cursor direction

The other case is

        some_line

[ENTER]

        some_line
        ^

[SPACEX4]

        some_line
    ^
----> cursor direction

Does that make sense?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29339>
_______________________________________


More information about the Python-bugs-list mailing list