示例#1
0
        void HandleCaretPositionChange()
        {
            if (CaretPositionChanged != null)
            {
                CaretPositionChanged(this, EventArgs.Empty);
            }

            if (quickClassBrowser != null)
            {
                quickClassBrowser.SelectItemAtCaretPosition(this.ActiveTextEditor.TextArea.Caret.Location);
            }

            NavigationService.Log(this.BuildNavPoint());
            var document   = this.Document;
            int lineOffset = document.GetLineByNumber(this.Line).Offset;
            int chOffset   = this.Column;
            int col        = 1;

            for (int i = 1; i < chOffset; i++)
            {
                if (document.GetCharAt(lineOffset + i - 1) == '\t')
                {
                    col += CodeEditorOptions.Instance.IndentationSize;
                }
                else
                {
                    col += 1;
                }
            }
            SD.StatusBar.SetCaretPosition(col, this.Line, chOffset);
        }
示例#2
0
        void HandleCaretPositionChange()
        {
            if (quickClassBrowser != null)
            {
                quickClassBrowser.SelectItemAtCaretPosition(this.ActiveTextEditorAdapter.Caret.Position);
            }

            CaretPositionChanged.RaiseEvent(this, EventArgs.Empty);
        }