rev087 / fancy-new-file

Create or open files and directories in Github's Atom by typing a relative path.
MIT License
9 stars 14 forks source link

Dismiss dialog with Esc key #2

Closed lmartins closed 10 years ago

lmartins commented 10 years ago

Would it be possible to add this? Right now doesn't seem to be possible to dismiss the dialog without creating a new file.

Tks.

rev087 commented 10 years ago

That's odd, Esc dismisses the dialog for me. What version of Atom are you using? (Atom in the Mac menu bar > About Atom)

I'm using the same event the official go-to-line package uses ('core:cancel'). If I can't get that to work for you, I might just revert to listen to the Esc key directly, but I suspect core:cancel is emitted from other actions as well.

lmartins commented 10 years ago

Weird, now that I got your message went to try it again and it worked as expected. Not sure i've restarted Atom before, maybe that's the cause for it.

Anyway, thanks for the info and for the useful plugin, closing now.

lmartins commented 10 years ago

Hey, sadly it started misbehaving again. This time I've noticed two things:

  1. When first invoking the panel, while using the default key binding, the panel is opened but also the developer tools (see screen below)
  2. Then, when I try to cancel the panel with ESC, the console shows an error: "Uncaught TypeError: Arguments to path.join must be strings "

screenshot 2014-03-10 20 38 48

rev087 commented 10 years ago

Good catch, it's breaking when there is no "project" open. The Sublime Text plugin uses the home directory as the reference for the relative paths in this case. Already working on a fix.

lmartins commented 10 years ago

Thanks Bruno, I was about to reply again because it was working, but I had a "project" so that explains. Thanks again.

Sent from my iPhone

On 10/03/2014, at 20:48, Bruno Daniel notifications@github.com wrote:

Good catch, it's breaking when there is no "project" open. The Sublime Text plugin uses the home directory as the reference for the relative paths in this case. Already working on a fix.

— Reply to this email directly or view it on GitHub.

rev087 commented 10 years ago

You're very welcome. Keep the bugs coming and I'll keep squashing them :)