Skip to content

Commit

Permalink
Hide unnecessary margins in the diff editor in the Pending Changes wi…
Browse files Browse the repository at this point in the history
…ndow
  • Loading branch information
sharwell committed Feb 11, 2013
1 parent d76aa08 commit 5b2f9de
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ToolWindowWithEditor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Runtime.InteropServices;
using System.Windows.Controls;
using GitScc.Diff;
using Microsoft.VisualStudio;
using Microsoft.VisualStudio.ComponentModelHost;
using Microsoft.VisualStudio.Editor;
Expand Down Expand Up @@ -101,6 +102,12 @@ public Tuple<Control, IVsTextView> SetDisplayedFile(string filePath)
//Get our WPF host from our text view (from our code window).
IWpfTextViewHost textViewHost = editorAdapterFactoryService.GetWpfTextViewHost(this.textView);

textViewHost.TextView.Options.SetOptionValue(GitTextViewOptions.DiffMarginId, false);
textViewHost.TextView.Options.SetOptionValue(DefaultTextViewHostOptions.ChangeTrackingId, false);
textViewHost.TextView.Options.SetOptionValue(DefaultTextViewHostOptions.GlyphMarginId, false);
textViewHost.TextView.Options.SetOptionValue(DefaultTextViewHostOptions.LineNumberMarginId, false);
textViewHost.TextView.Options.SetOptionValue(DefaultTextViewHostOptions.OutliningMarginId, false);

textViewHost.TextView.Options.SetOptionValue(DefaultTextViewOptions.ViewProhibitUserInputId, true);

return Tuple.Create<Control, IVsTextView>(textViewHost.HostControl, this.textView);
Expand Down

0 comments on commit 5b2f9de

Please sign in to comment.