Skip to content

Commit

Permalink
Don't display hover tip for a target when hovering on one of its (chi…
Browse files Browse the repository at this point in the history
…ld) task elements.

#5
  • Loading branch information
tintoy committed Apr 20, 2018
1 parent 2c6b4bc commit ce19add
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/LanguageServer.Engine/Handlers/HoverHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,10 @@ async Task<Hover> OnHover(TextDocumentPositionParams parameters, CancellationTok
}
case MSBuildTarget target:
{
hoverContent = contentProvider.Target(target);
// Currently (and this is a bug), an MSBuildTarget is returned by MSBuildLocator when the location being inspected
// is actually on one of its child (task) elements.
if (element.Path == WellKnownElementPaths.Target)
hoverContent = contentProvider.Target(target);

break;
}
Expand Down

0 comments on commit ce19add

Please sign in to comment.