From 43c873fa2d7f5c54f0737e2f7509a055e3f6cc09 Mon Sep 17 00:00:00 2001 From: Ankita Khera Date: Fri, 31 Jul 2020 15:19:51 -0400 Subject: [PATCH] Made some minor changes so that the hint is associated with the prior character --- .../InlineParameterNameHints/InlineParameterNameHintsTag.cs | 4 ++-- .../InlineParameterNameHintsDataTaggerProvider.cs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/EditorFeatures/Core.Wpf/InlineParameterNameHints/InlineParameterNameHintsTag.cs b/src/EditorFeatures/Core.Wpf/InlineParameterNameHints/InlineParameterNameHintsTag.cs index 8b26ea2949d..804a3916c27 100644 --- a/src/EditorFeatures/Core.Wpf/InlineParameterNameHints/InlineParameterNameHintsTag.cs +++ b/src/EditorFeatures/Core.Wpf/InlineParameterNameHints/InlineParameterNameHintsTag.cs @@ -21,11 +21,11 @@ internal class InlineParameterNameHintsTag : IntraTextAdornmentTag /// /// Creates the UIElement on call - /// Uses PositionAffinity.Successor because we want the tag to be associated with the following character + /// Uses PositionAffinity.Predecessor because we want the tag to be associated with the preceding character /// /// The name of the parameter associated with the argument public InlineParameterNameHintsTag(string text, double lineHeight, TextFormattingRunProperties format) - : base(CreateElement(text, lineHeight, format), removalCallback: null, PositionAffinity.Successor) + : base(CreateElement(text, lineHeight, format), removalCallback: null, PositionAffinity.Predecessor) { } diff --git a/src/EditorFeatures/Core/InlineParameterNameHints/InlineParameterNameHintsDataTaggerProvider.cs b/src/EditorFeatures/Core/InlineParameterNameHints/InlineParameterNameHintsDataTaggerProvider.cs index 81c031392b8..4236bb2a0d5 100644 --- a/src/EditorFeatures/Core/InlineParameterNameHints/InlineParameterNameHintsDataTaggerProvider.cs +++ b/src/EditorFeatures/Core/InlineParameterNameHints/InlineParameterNameHintsDataTaggerProvider.cs @@ -38,6 +38,7 @@ internal class InlineParameterNameHintsDataTaggerProvider : AsynchronousViewTagg private readonly IAsynchronousOperationListener _listener; protected override IEnumerable> PerLanguageOptions => SpecializedCollections.SingletonEnumerable(FeatureOnOffOptions.InlineParameterNameHints); + protected override SpanTrackingMode SpanTrackingMode => SpanTrackingMode.EdgeInclusive; [Obsolete(MefConstruction.ImportingConstructorMessage, error: true)] [ImportingConstructor] -- GitLab