Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit 0f39728

Browse files
committed
Fix #394: Code hidden by method completion.
1 parent 63298a2 commit 0f39728

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/AddIns/BackendBindings/CSharpBinding/Project/Src/Completion/CSharpMethodInsight.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ public CSharpMethodInsight(ITextEditor editor, int startOffset, IEnumerable<CSha
5050
public void Show()
5151
{
5252
window = editor.ShowInsightWindow(items);
53-
window.StartOffset = startOffset;
53+
// Set startOffset so that window always appears below the caret line
54+
var startLocation = editor.Document.GetLocation(startOffset);
55+
window.StartOffset = editor.Document.GetOffset(editor.Caret.Line, startLocation.Column);
5456
// closing the window at the end of the parameter list is handled by the CaretPositionChanged event
5557
window.EndOffset = editor.Document.TextLength;
5658
if (initiallySelectedItem != null)

0 commit comments

Comments
 (0)