예제 #1
0
        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);
            }
        }