Skip to content

Commit

Permalink
Fix differences not shown for files without BOM preamble (close #25)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentkempe committed Mar 24, 2014
1 parent 7a63b75 commit 8479368
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion GitDiffMargin/Git/GitCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private static byte[] GetCompleteContent(ITextDocument textDocument, ITextSnapsh
var content = textDocument.Encoding.GetBytes(currentText);

var preamble = textDocument.Encoding.GetPreamble();
if (preamble.Length <= 0) return null;
if (preamble.Length == 0) return content;

var completeContent = new byte[preamble.Length + content.Length];
Buffer.BlockCopy(preamble, 0, completeContent, 0, preamble.Length);
Expand Down

0 comments on commit 8479368

Please sign in to comment.