diff options
author | Kurt B. Kaiser <kbk@shore.net> | 2005-06-21 02:42:17 (GMT) |
---|---|---|
committer | Kurt B. Kaiser <kbk@shore.net> | 2005-06-21 02:42:17 (GMT) |
commit | 8fa7eb563bb9a14651bcdc8ee60c5e45302c2f59 (patch) | |
tree | e58775fad7894946709d487cffe7346ca890b224 /Lib/idlelib/PyShell.py | |
parent | 188d4366bed88bbca777c05e7f1a5cb3878ff335 (diff) | |
download | cpython-8fa7eb563bb9a14651bcdc8ee60c5e45302c2f59.zip cpython-8fa7eb563bb9a14651bcdc8ee60c5e45302c2f59.tar.gz cpython-8fa7eb563bb9a14651bcdc8ee60c5e45302c2f59.tar.bz2 |
Remove dead code
M IdleHistory.py
M PyShell.py
Diffstat (limited to 'Lib/idlelib/PyShell.py')
-rw-r--r-- | Lib/idlelib/PyShell.py | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py index 8115e63..bc3954e 100644 --- a/Lib/idlelib/PyShell.py +++ b/Lib/idlelib/PyShell.py @@ -1134,19 +1134,15 @@ class PyShell(OutputWindow): self.text.mark_set("insert", "end-1c") s = s.strip() lines = s.split('\n') - if lines: - prefix = self.text.get("insert linestart","insert").rstrip() - if prefix and prefix[-1]==':': + prefix = self.text.get("insert linestart","insert").rstrip() + if prefix and prefix[-1]==':': + self.newline_and_indent_event(event) + self.text.insert("insert",lines[0].strip()) + if len(lines) > 1: + self.newline_and_indent_event(event) + for line in lines[1:]: + self.text.insert("insert", line.strip()) self.newline_and_indent_event(event) - - self.text.insert("insert",lines[0].strip()) - if len(lines) > 1: - self.newline_and_indent_event(event) - for line in lines[1:]: - self.text.insert("insert", line.strip()) - self.newline_and_indent_event(event) - else: - self.text.insert("insert", s) finally: self.text.see("insert") self.text.undo_block_stop() |