コード例 #1
0
ファイル: RInteractiveWorkflow.cs プロジェクト: xoriath/RTVS
        private void LastActiveTextViewChanged(object sender, ActiveTextViewChangedEventArgs e)
        {
            if (ActiveWindow == null)
            {
                return;
            }

            if (ActiveWindow.TextView.Equals(e.Old) && !ActiveWindow.TextView.Equals(e.New))
            {
                _replLostFocus = true;
                Shell.DispatchOnUIThread(CheckPossibleBreakModeFocusChange);
            }

            if (ActiveWindow.TextView.Equals(e.New))
            {
                Shell.DispatchOnUIThread(Operations.PositionCaretAtPrompt);
            }
        }
コード例 #2
0
        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);
            }
        }