Skip to content

Commit c2741aa

Browse files
committed
fix newline bug
1 parent 95da711 commit c2741aa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

file_diffs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ def run_diff(self, a, b, from_file=None, to_file=None):
101101
self.diff_with_external(a, b, from_file, to_file)
102102

103103
if open_in_sublime:
104+
# fix diffs
105+
diffs = map(lambda line: (line and line[-1] == "\n") and line or line + "\n", diffs)
104106
self.diff_in_sublime(diffs)
105107

106108
def diff_with_external(self, a, b, from_file=None, to_file=None):

0 commit comments

Comments
 (0)