From: Kurt B. Kaiser Date: Mon, 26 Apr 2004 22:26:04 +0000 (+0000) Subject: Fix a bug I introduced which causes all block openers at an indent level X-Git-Tag: v2.4a1~471 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e3636e05dece349d97afc97b00945d795a5878e2;p=python Fix a bug I introduced which causes all block openers at an indent level to be shown, instead of outdenting each level. --- diff --git a/Lib/idlelib/CodeContext.py b/Lib/idlelib/CodeContext.py index d8f9237157..f2fda41d3d 100644 --- a/Lib/idlelib/CodeContext.py +++ b/Lib/idlelib/CodeContext.py @@ -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: