Commit 2618c7fa authored by Kurt B. Kaiser's avatar Kurt B. Kaiser

1. Mac line endings were incorrect when pasting code from some browsers

   when using X11 and the Fink distribution.  Python Bug 1263656.
2. Eliminate duplicated code in ScriptBinding.run_module_event()
Modified Files:
 	NEWS.txt ScriptBinding.py
parent 88b8582e
......@@ -3,6 +3,9 @@ What's New in IDLE 1.2a0?
*Release date: XX-XXX-2005*
- Mac line endings were incorrect when pasting code from some browsers
when using X11 and the Fink distribution. Python Bug 1263656.
- <Enter> when cursor is on a previous command retrieves that command. Instead
of replacing the input line, the previous command is now appended to the
input line. Indentation is preserved, and undo is enabled.
......
......@@ -53,7 +53,7 @@ class ScriptBinding:
self.flist = self.editwin.flist
self.root = self.flist.root
def check_module_event(self, event):
def check_module_event(self, event=None):
filename = self.getfilename()
if not filename:
return
......@@ -87,6 +87,7 @@ class ScriptBinding:
f.close()
if '\r' in source:
source = re.sub(r"\r\n", "\n", source)
source = re.sub(r"\r", "\n", source)
if source and source[-1] != '\n':
source = source + '\n'
text = self.editwin.text
......@@ -132,12 +133,7 @@ class ScriptBinding:
add that directory to its sys.path if not already included.
"""
filename = self.getfilename()
if not filename:
return
if not self.tabnanny(filename):
return
code = self.checksyntax(filename)
code = self.check_module_event(event)
if not code:
return
shell = self.shell
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment