Skip to content

Commit 71cd6f5

Browse files
committed
Updated when the view gets aggregate focus.
1 parent 29b0085 commit 71cd6f5

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/GtmExtension/GtmListener.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,16 @@ public void VsTextViewCreated(IVsTextView textView)
162162
Initialize();
163163

164164
IWpfTextView wpfTextView = editor.GetWpfTextView(textView);
165+
wpfTextView.GotAggregateFocus += WpfTextView_GotAggregateFocus;
165166
wpfTextView.LayoutChanged += WpfTextView_LayoutChanged;
166167
wpfTextView.Caret.PositionChanged += Caret_PositionChanged;
167168

168169
Update(GetFilePath(wpfTextView));
169170
}
171+
private void WpfTextView_GotAggregateFocus(object sender, EventArgs e)
172+
{
173+
Update(GetFilePath((ITextView)sender));
174+
}
170175
private void WpfTextView_LayoutChanged(object sender, TextViewLayoutChangedEventArgs e)
171176
{
172177
Update(GetFilePath((ITextView)sender));

0 commit comments

Comments
 (0)