void TextView_Closed(object sender, EventArgs e) { currentBracePair = null; bracePairCollection = BracePairCollection.Empty; textView.Closed -= TextView_Closed; textView.Options.OptionChanged -= Options_OptionChanged; textView.Caret.PositionChanged -= Caret_PositionChanged; }
public BracePairService(ITextView textView) { if (textView == null) { throw new ArgumentNullException(nameof(textView)); } this.textView = textView; this.bracePairCollection = BracePairCollection.Empty; textView.Closed += TextView_Closed; textView.Options.OptionChanged += Options_OptionChanged; UpdateBraceMatching(); }
public void SetBracePairCollection(BracePairCollection bracePairCollection) { this.bracePairCollection = bracePairCollection ?? BracePairCollection.Empty; RefreshAllTags(); }