diff --git a/vsintegration/src/FSharp.Editor/Common/Extensions.fs b/vsintegration/src/FSharp.Editor/Common/Extensions.fs index 3483c9c583e..2ed87e5ec82 100644 --- a/vsintegration/src/FSharp.Editor/Common/Extensions.fs +++ b/vsintegration/src/FSharp.Editor/Common/Extensions.fs @@ -97,10 +97,10 @@ type ConnectionPointSubscription = System.IDisposable option // Usage example: // If a handler is None, to not handle that event -// let subscription = subscribeToTextViewEvents (textView, onChangeCaretHandler, onKillFocus, OnSetFocus) +// let subscription = subscribeToTextViewEvents (textView, onChangeCaretHandler, onKillFocus, onSetFocus) // Unsubscribe using subscription.Dispose() -let subscribeToTextViewEvents (textView: IVsTextView, onChangeCaretHandler, onKillFocus, OnSetFocus) : ConnectionPointSubscription = - let handler = TextViewEventsHandler(onChangeCaretHandler, onKillFocus, OnSetFocus) +let subscribeToTextViewEvents (textView: IVsTextView, onChangeCaretHandler, onKillFocus, onSetFocus) : ConnectionPointSubscription = + let handler = TextViewEventsHandler(onChangeCaretHandler, onKillFocus, onSetFocus) match textView with | :? IConnectionPointContainer as cpContainer ->