diff options
author | Kurt B. Kaiser <kbk@shore.net> | 2005-11-15 07:20:06 (GMT) |
---|---|---|
committer | Kurt B. Kaiser <kbk@shore.net> | 2005-11-15 07:20:06 (GMT) |
commit | b61602c96821997884e7de08d56404904baa034b (patch) | |
tree | 7acfea7e052f3c528598d59e3b98ac6e8264a1f9 /Lib/idlelib/EditorWindow.py | |
parent | 6b347890462d07ee87593d5619d84c67d4729232 (diff) | |
download | cpython-b61602c96821997884e7de08d56404904baa034b.zip cpython-b61602c96821997884e7de08d56404904baa034b.tar.gz cpython-b61602c96821997884e7de08d56404904baa034b.tar.bz2 |
Better indentation after first line of string continuation.
IDLEfork Patch 681992, Noam Raphael
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 |