diff options
Diffstat (limited to 'Lib/idlelib/EditorWindow.py')
-rw-r--r-- | Lib/idlelib/EditorWindow.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py index 3c4585b..cc38122 100644 --- a/Lib/idlelib/EditorWindow.py +++ b/Lib/idlelib/EditorWindow.py @@ -1078,8 +1078,12 @@ class EditorWindow(object): c = y.get_continuation_type() if c != PyParse.C_NONE: # The current stmt hasn't ended yet. - if c == PyParse.C_STRING: - # inside a string; just mimic the current indent + if c == PyParse.C_STRING_FIRST_LINE: + # after the first line of a string; do not indent at all + pass + elif c == PyParse.C_STRING_NEXT_LINES: + # inside a string which started before this line; + # just mimic the current indent text.insert("insert", indent) elif c == PyParse.C_BRACKET: # line up with the first (if any) element of the |