Browse Source

Fix #394: Code hidden by method completion.

pull/499/head
Andreas Weizel 11 years ago
parent
commit
0f397285c8
  1. 4
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/Completion/CSharpMethodInsight.cs

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

@ -50,7 +50,9 @@ namespace CSharpBinding.Completion
public void Show() public void Show()
{ {
window = editor.ShowInsightWindow(items); window = editor.ShowInsightWindow(items);
window.StartOffset = startOffset; // Set startOffset so that window always appears below the caret line
var startLocation = editor.Document.GetLocation(startOffset);
window.StartOffset = editor.Document.GetOffset(editor.Caret.Line, startLocation.Column);
// closing the window at the end of the parameter list is handled by the CaretPositionChanged event // closing the window at the end of the parameter list is handled by the CaretPositionChanged event
window.EndOffset = editor.Document.TextLength; window.EndOffset = editor.Document.TextLength;
if (initiallySelectedItem != null) if (initiallySelectedItem != null)

Loading…
Cancel
Save