Determine autocomplete position before filtering matches

This commit is contained in:
Corey Johnson & Nathan Sobo 2012-04-20 11:48:33 -07:00
parent caaa517b8b
commit 34c3bdfe36

View File

@ -87,11 +87,12 @@ class Autocomplete extends View
@originalSelectedText = @editor.getSelectedText()
@originalSelectionBufferRange = @editor.getSelection().getBufferRange()
@allMatches = @findMatchesForCurrentSelection()
@filterMatches()
cursorScreenPosition = @editor.getCursorScreenPosition()
{left, top} = @editor.pixelPositionForScreenPosition(cursorScreenPosition)
@css {left: left, top: top + @editor.lineHeight}
@filterMatches()
@editor.lines.append(this)
@miniEditor.focus()