]> granicus.if.org Git - python/commitdiff
Fix a bug I introduced which causes all block openers at an indent level
authorKurt B. Kaiser <kbk@shore.net>
Mon, 26 Apr 2004 22:26:04 +0000 (22:26 +0000)
committerKurt B. Kaiser <kbk@shore.net>
Mon, 26 Apr 2004 22:26:04 +0000 (22:26 +0000)
to be shown, instead of outdenting each level.

Lib/idlelib/CodeContext.py

index d8f9237157f29356f55b6c077aaf2d5ae4877747..f2fda41d3d055573fc7d2cdc9f9909854ab74145 100644 (file)
@@ -100,7 +100,7 @@ class CodeContext:
             indent, text, opener = self.get_line_info(line_index)
             if indent < lastindent:
                 lastindent = indent
-                if opener == "else" or "elif":
+                if opener in ("else", "elif"):
                     # We also show the if statement
                     lastindent += 1
                 if opener and line_index < firstline: