diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/src/addins/CSharpBinding/MonoDevelop.CSharp.Features/ParameterHinting/ParameterUtil.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Features/ParameterHinting/ParameterUtil.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Features/ParameterHinting/ParameterUtil.cs index 8819453b88..da6b5106cb 100644 --- a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Features/ParameterHinting/ParameterUtil.cs +++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Features/ParameterHinting/ParameterUtil.cs @@ -69,9 +69,10 @@ namespace ICSharpCode.NRefactory6.CSharp return ParameterIndexResult.Invalid; int i = 0; + int j = 0; foreach (var child in invocation.ArgumentList.ChildNodesAndTokens ()) { if (child.Span.End > caretOffset) { - if (i == 0 && caretOffset <= child.SpanStart) + if (i == 0 && j <= 1) return ParameterIndexResult.First; return new ParameterIndexResult (usedNamedParameters != null ? usedNamedParameters.ToArray () : null, i + 1); } @@ -87,6 +88,10 @@ namespace ICSharpCode.NRefactory6.CSharp usedNamedParameters.Add (node.NameColon.Name.Identifier.Text); } } + j++; + } + if (j > 0) { + return new ParameterIndexResult (usedNamedParameters != null ? usedNamedParameters.ToArray () : null, i + 1); } return ParameterIndexResult.Invalid; } |