diff options
3 files changed, 7 insertions, 3 deletions
diff --git a/src/Editor/Text/Def/TextUI/Editor/TextViewExtensions2.cs b/src/Editor/Text/Def/TextUI/Editor/TextViewExtensions2.cs index cc6a171..87c274d 100644 --- a/src/Editor/Text/Def/TextUI/Editor/TextViewExtensions2.cs +++ b/src/Editor/Text/Def/TextUI/Editor/TextViewExtensions2.cs @@ -88,6 +88,7 @@ namespace Microsoft.VisualStudio.Text.Editor public static void NavigateToLineAndColumn(this ITextView textView, int lineNumber, int columnNumber = 0) { + textView.Selection.Clear(); var point = textView.TextSnapshot.TryGetSnapshotPoint(lineNumber, columnNumber) ?? default; if (point != default) { diff --git a/src/Editor/Text/Def/TextUICocoa/Extras/GoToLine/GoToLineCommandArgs.cs b/src/Editor/Text/Def/TextUICocoa/Extras/GoToLine/GoToLineCommandArgs.cs index e3c0727..41c4722 100644 --- a/src/Editor/Text/Def/TextUICocoa/Extras/GoToLine/GoToLineCommandArgs.cs +++ b/src/Editor/Text/Def/TextUICocoa/Extras/GoToLine/GoToLineCommandArgs.cs @@ -11,21 +11,24 @@ namespace Microsoft.VisualStudio.Text.Extras.GoToLine public class GoToLineCommandArgs : EditorCommandArgs { public int? LineNumber { get; private set; } + public int? ColumnNumber { get; private set; } public GoToLineCommandArgs( ITextView textView, ITextBuffer subjectBuffer) - : this(textView, subjectBuffer, null) + : this(textView, subjectBuffer, null, null) { } public GoToLineCommandArgs( ITextView textView, ITextBuffer subjectBuffer, - int? lineNumber) + int? lineNumber, + int? columnNumber) : base(textView, subjectBuffer) { LineNumber = lineNumber; + ColumnNumber = columnNumber; } } }
\ No newline at end of file diff --git a/src/Editor/Text/Def/TextUICocoa/Extras/GoToLine/IGoToLinePresenter.cs b/src/Editor/Text/Def/TextUICocoa/Extras/GoToLine/IGoToLinePresenter.cs index ccf427e..aa5efab 100644 --- a/src/Editor/Text/Def/TextUICocoa/Extras/GoToLine/IGoToLinePresenter.cs +++ b/src/Editor/Text/Def/TextUICocoa/Extras/GoToLine/IGoToLinePresenter.cs @@ -13,6 +13,6 @@ namespace Microsoft.VisualStudio.Text.Extras.GoToLine { void Show(); void Hide(); - bool NavigateToLine(int lineNumber); + bool NavigateToLine(int lineNumber, int? columnNumber); } }
\ No newline at end of file |