private void LastActiveTextViewChanged(object sender, ActiveTextViewChangedEventArgs e) { if (ActiveWindow == null) { return; } if (ActiveWindow.TextView.HasAggregateFocus) { Shell.MainThread().Post(Operations.PositionCaretAtPrompt); } }
private void LastActiveTextViewChanged(object sender, ActiveTextViewChangedEventArgs e) { if (ActiveWindow == null) { return; } if (ActiveWindow.TextView.Equals(e.Old) && !ActiveWindow.TextView.Equals(e.New)) { _replLostFocus = true; _coreShell.DispatchOnUIThread(CheckPossibleBreakModeFocusChange); } if (ActiveWindow.TextView.Equals(e.New)) { _coreShell.DispatchOnUIThread(Operations.PositionCaretAtPrompt); } }
private void LastActiveTextViewChanged(object sender, ActiveTextViewChangedEventArgs e) { if (ActiveWindow == null) { return; } // Check if REPL lost focus and focus moved to the editor if (!ActiveWindow.TextView.HasAggregateFocus && !string.IsNullOrEmpty(e.New?.TextBuffer?.GetFilePath())) { _replLostFocus = true; Shell.DispatchOnUIThread(CheckPossibleBreakModeFocusChange); } if (ActiveWindow.TextView.HasAggregateFocus) { Shell.DispatchOnUIThread(Operations.PositionCaretAtPrompt); } }
private void LastActiveTextViewChanged(object sender, ActiveTextViewChangedEventArgs e) { if (ActiveWindow == null) { return; } // Check if REPL lost focus and focus moved to the editor. // In VS 2017 and above, this is handled by the debugger itself, via IVsDebugger6.RegisterFocusPreservingWindow. if (_debuggerModeTracker.IsFocusStolenOnBreak && !ActiveWindow.TextView.HasAggregateFocus && !string.IsNullOrEmpty(e.New?.TextBuffer?.GetFilePath())) { _replLostFocus = true; Shell.DispatchOnUIThread(CheckPossibleBreakModeFocusChange); } if (ActiveWindow.TextView.HasAggregateFocus) { Shell.DispatchOnUIThread(Operations.PositionCaretAtPrompt); } }