TAB doesn't work unless point is at beginning of whitespace
Bug #898354 reported by
Barry Warsaw
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-mode.el |
Fix Released
|
Medium
|
Andreas Roehler |
Bug Description
revno 713
-----snip-----
class Foo:
def bar(self, args):
return sum(args)
-----snip-----
Now, go to the end of the bar(...): line and hit return. Then type 'try:'
Now hit C-n to move point down to the second 'r' in 'return'. Hit TAB. Nothing happens.
What should happen is that the return line gets indented 4 spaces, but point is still left on the second 'r'.
Instead, you have to hit TAB multiple times, to toggle the line from columns 0, 4, 8, 12, but then this leaves point at the beginning of the line.
Changed in python-mode: | |
status: | New → In Progress |
Changed in python-mode: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Am 30.11.2011 21:51, schrieb Barry Warsaw:
> Public bug reported:
>
> revno 713
>
> -----snip-----
> class Foo:
> def bar(self, args):
> return sum(args)
> -----snip-----
>
> Now, go to the end of the bar(...): line and hit return. Then type
> 'try:'
>
> Now hit C-n to move point down to the second 'r' in 'return'. Hit TAB.
> Nothing happens.
>
> What should happen is that the return line gets indented 4 spaces, but
> point is still left on the second 'r'.
that's because column 12 is right. A first TAB does nothing in this
case. A second TAB starts circling.
>
> Instead, you have to hit TAB multiple times, to toggle the line from
> columns 0, 4, 8, 12, but then this leaves point at the beginning of the
> line.
>
okay.
Could stipulate: when circling, keep relative position in line.
Is it worth the price?
Nice thing with present state is: column number mode indicates the indent.
Anyway, just tell what you prefer.
Cheers,
Andreas