Skip to content

Commit

Permalink
document: do not add EOL when saving file. Qutepart does this
Browse files Browse the repository at this point in the history
  • Loading branch information
hlamer committed May 13, 2015
1 parent 87ea5f9 commit a722f2e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions enki/core/document.py
Expand Up @@ -260,7 +260,7 @@ def _readFile(self, filePath):
'You may corrupt your file, if saved it')
text = unicode(data, 'utf8', 'replace')

# Strip last EOL. It will be restored, when saving
# Strip last EOL. Qutepart adds it when saving file
if text.endswith('\r\n'):
text = text[:-2]
elif text.endswith('\r') or text.endswith('\n'):
Expand Down Expand Up @@ -341,8 +341,6 @@ def _saveToFs(self, filePath):
return

text = self.qutepart.textForSaving()
if not text.endswith(self.qutepart.eol):
text += self.qutepart.eol

# Write file
data = text.encode('utf8')
Expand Down

0 comments on commit a722f2e

Please sign in to comment.