Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e3636e0

Browse files
committed
Fix a bug I introduced which causes all block openers at an indent level
to be shown, instead of outdenting each level.
1 parent ce97fbe commit e3636e0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/idlelib/CodeContext.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def interesting_lines(self, firstline):
100100
indent, text, opener = self.get_line_info(line_index)
101101
if indent < lastindent:
102102
lastindent = indent
103-
if opener == "else" or "elif":
103+
if opener in ("else", "elif"):
104104
# We also show the if statement
105105
lastindent += 1
106106
if opener and line_index < firstline:

0 commit comments

Comments
 (0)