Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vs-editor-api.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandy Armstrong <sandy@xamarin.com>2020-01-13 20:23:40 +0300
committerSandy Armstrong <sandy@xamarin.com>2020-01-13 20:23:40 +0300
commit07690d994608d557268caf0726711d3bf52a9bb1 (patch)
tree28234145052dc7fe20b8928f6b30d40667e83588
parent109220f5a283245ed9ffb70f82ca061d4d6d3dad (diff)
Sync with vs-editor-core@780251bfc
-rw-r--r--src/Editor/Text/Def/TextUI/Editor/TextViewExtensions2.cs1
-rw-r--r--src/Editor/Text/Def/TextUICocoa/Extras/GoToLine/GoToLineCommandArgs.cs7
-rw-r--r--src/Editor/Text/Def/TextUICocoa/Extras/GoToLine/IGoToLinePresenter.cs2
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