Fix #92: Make sure the handle is closed

This commit is contained in:
Paddy Xu
2017-10-15 16:10:29 +03:00
parent 66fdeefe84
commit 6e5e7cb891
2 changed files with 5 additions and 4 deletions

View File

@@ -85,9 +85,12 @@ namespace QuickLook.Plugin.TextViewer
s.Read(buffer, 0, bufferLength);
viewer.Encoding = CharsetDetector.DetectFromBytes(buffer).Detected?.Encoding ?? Encoding.Default;
s.Position = 0;
viewer.Load(s);
}
viewer.Load(path);
//viewer.Load(path);
viewer.SyntaxHighlighting = HighlightingManager.Instance.GetDefinitionByExtension(Path.GetExtension(path));
}
}