Fix bug where editor was not focused when selecting a path in fuzzy finder

This is hard to test. What was happening before is that the opening of
the file in the editor was causing the mini editor in the fuzzy finder
to be unfocused, which was then triggering the mini editor to cancel.
Some strange interaction of a focus triggered by a focus was causing
the editor to actually lose focus. By using @cancel to close the editor
instead of @detach, we avoid spurious handling of the unfocusing of the
editor because @cancel already avoids that.
This commit is contained in:
Nathan Sobo
2012-10-03 20:59:03 -10:00
parent 081a57b511
commit a4c25f1cb7

View File

@@ -29,8 +29,8 @@ class FuzzyFinder extends SelectList
confirmed : (path) ->
return unless path.length
@cancel()
@rootView.open(path, {@allowActiveEditorChange})
@detach()
cancelled: ->
@miniEditor.setText('')