private void ResetForText(string fileName) { Reset(false, true); if (fileName == null) { _internalFileViewer.SetHighlighting("Default"); } else { EditorOptions.SetSyntax(_internalFileViewer, fileName); } if (!string.IsNullOrEmpty(fileName) && (fileName.EndsWith(".diff", StringComparison.OrdinalIgnoreCase) || fileName.EndsWith(".patch", StringComparison.OrdinalIgnoreCase))) { ResetForDiff(); } }
public void SetSyntax(string fileName) { EditorOptions.SetSyntax(_internalFileViewer, fileName); }