[meld] Fix newline disagreement on otherwise empty lines (closes bgo#655455)



commit d03a77c8050df0d011ac2e34455a2452ed4a98bd
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sun Jul 31 12:37:39 2011 +1000

    Fix newline disagreement on otherwise empty lines (closes bgo#655455)

 meld/filediff.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/meld/filediff.py b/meld/filediff.py
index 089129d..68b6cb1 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -129,7 +129,7 @@ class BufferLines(object):
                 # It's possible that the last line in a file would end in a
                 # line break character, which requires no joining.
                 if end and end[-1] in additional_breaks and \
-                   line and line[-1] not in additional_breaks:
+                   (not line or line[-1] not in additional_breaks):
                     assert len(ends) >= i + 1
                     lines[i:i + 2] = [line + end[-1] + lines[i + 1]]
                     ends[i:i + 2] = [end + ends[i + 1]]



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]