mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
(py-outdent-p): When looking at the previous line, watch out for
continuation lines. This fixes this bug report, reported by Frank
Stajano.
# But if I split the "raise" line and reindent, the else WRONGLY goes up a
# level (?!?)
while condition1:
if condition2:
raise error3, \
moreInfo4
else: # meant to close "if condition2"
action5()
This commit is contained in:
parent
9ec9fbc355
commit
f06777dd7c
1 changed files with 3 additions and 1 deletions
|
|
@ -960,7 +960,9 @@ py-beep-if-tab-change\t\tring the bell if tab-width is changed"
|
|||
(save-excursion
|
||||
(and (progn (back-to-indentation)
|
||||
(looking-at py-outdent-re))
|
||||
(progn (backward-to-indentation 1)
|
||||
(progn (forward-line -1)
|
||||
(py-goto-initial-line)
|
||||
(back-to-indentation)
|
||||
(while (or (looking-at py-blank-or-comment-re)
|
||||
(bobp))
|
||||
(backward-to-indentation 1))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue