[Python-checkins] python/dist/src/Mac/Tools/IDE PyEdit.py, 1.43,
1.44
jvr at users.sourceforge.net
jvr at users.sourceforge.net
Tue Nov 18 17:41:18 EST 2003
Update of /cvsroot/python/python/dist/src/Mac/Tools/IDE
In directory sc8-pr-cvs1:/tmp/cvs-serv25422
Modified Files:
PyEdit.py
Log Message:
Fix for [ 782686 ]: new files used \r as the default line separator
instead of os.linesep.
Index: PyEdit.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Tools/IDE/PyEdit.py,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** PyEdit.py 9 May 2003 08:58:02 -0000 1.43
--- PyEdit.py 18 Nov 2003 22:41:16 -0000 1.44
***************
*** 58,76 ****
self._creator, filetype = MacOS.GetCreatorAndType(path)
self.addrecentfile(path)
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:
--- 58,73 ----
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
self.settings = {}
if self.path:
***************
*** 94,99 ****
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"):
--- 91,94 ----
More information about the Python-checkins
mailing list