=== modified file 'Lib/idlelib/PyShell.py'
--- Lib/idlelib/PyShell.py 2009-01-27 00:28:36 +0000
+++ Lib/idlelib/PyShell.py 2009-03-11 15:46:53 +0000
@@ -303,13 +303,17 @@
})
class ModifiedUndoDelegator(UndoDelegator):
- "Extend base class: forbid insert/delete before the I/O mark"
+ "Extend base class: redirects inser/delete after the I/O mark"
def insert(self, index, chars, tags=None):
try:
- if self.delegate.compare(index, "<", "iomark"):
- self.delegate.bell()
- return
+ if self.delegate.compare(index, "<", "iomark"):
+ try: # improved behavior
+ text = self.delegate.delegate.delegate
+ text.mark_set("insert", "end-1c")
+ except: # on error, default to old behavior
+ self.delegate.bell()
+ return
except TclError:
pass
UndoDelegator.insert(self, index, chars, tags)
@@ -814,6 +818,10 @@
text.bind("<