summaryrefslogtreecommitdiffstats
path: root/Mac/Tools
diff options
context:
space:
mode:
Diffstat (limited to 'Mac/Tools')
-rw-r--r--Mac/Tools/IDE/PyEdit.py21
1 files changed, 8 insertions, 13 deletions
diff --git a/Mac/Tools/IDE/PyEdit.py b/Mac/Tools/IDE/PyEdit.py
index 502f7c4..0ad7a8a 100644
--- a/Mac/Tools/IDE/PyEdit.py
+++ b/Mac/Tools/IDE/PyEdit.py
@@ -57,21 +57,18 @@ class Editor(W.Window):
f.close()
self._creator, filetype = MacOS.GetCreatorAndType(path)
self.addrecentfile(path)
+ if '\n' in text:
+ if string.find(text, '\r\n') >= 0:
+ self._eoln = '\r\n'
+ else:
+ self._eoln = '\n'
+ text = string.replace(text, self._eoln, '\r')
+ else:
+ self._eoln = '\r'
else:
raise IOError, "file '%s' does not exist" % path
self.path = path
- if '\n' in text:
- if string.find(text, '\r\n') >= 0:
- self._eoln = '\r\n'
- else:
- self._eoln = '\n'
- text = string.replace(text, self._eoln, '\r')
- change = 0
- else:
- change = 0
- self._eoln = '\r'
-
self.settings = {}
if self.path:
self.readwindowsettings()
@@ -93,8 +90,6 @@ class Editor(W.Window):
W.Window.__init__(self, bounds, self.title, minsize = (330, 120), tabbable = 0)
self.setupwidgets(text)
- if change > 0:
- self.editgroup.editor.textchanged()
if self.settings.has_key("selection"):
selstart, selend = self.settings["selection"]