From 8479368365819fe2d7f25cd210def8c2f60089d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurent=20Kemp=C3=A9?= Date: Mon, 24 Mar 2014 08:23:56 +0100 Subject: [PATCH] Fix differences not shown for files without BOM preamble (close #25) --- GitDiffMargin/Git/GitCommands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GitDiffMargin/Git/GitCommands.cs b/GitDiffMargin/Git/GitCommands.cs index a33d9bf..ecfa60a 100644 --- a/GitDiffMargin/Git/GitCommands.cs +++ b/GitDiffMargin/Git/GitCommands.cs @@ -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);