static void UpdateCaretPosition(CaretImpl caret) { // int offset = caret.Offset; // if (offset < 0 || offset > caret.TextEditorData.Document.TextLength) // return; // DocumentLocation location = caret.TextEditorData.LogicalToVisualLocation (caret.Location); // IdeApp.Workbench.StatusBar.ShowCaretState (caret.Line, // location.Column, // caret.TextEditorData.IsSomethingSelected ? caret.TextEditorData.SelectionRange.Length : 0, // caret.IsInInsertMode); }
internal static void CaretPositionChanged(object sender, DocumentLocationEventArgs e) { CaretImpl caret = (CaretImpl)sender; UpdateCaretPosition(caret); }