hharnisc / hypercwd

Opens new tabs with the same directory as the current tab in Hyper
MIT License
385 stars 39 forks source link

Close window issue with `initialWorkingDirectory` #28

Closed bhardy closed 7 years ago

bhardy commented 7 years ago

Hey,

Great plugin. I've been using it for quite a while with no issues and I'm sure it's saved me hours of time.

The other day I was looking through the options and I found initialWorkingDirectory—which is perfect for me, as all of my development work is in in the same base directory. I set it to initialWorkingDirectory: "~/Development", and everything seemed to be working fine until I caught a bug.

Today I was simply trying to close all my Hyper terminals with cmd+w, and that's when I realized I couldn't close the window anymore. All the tabs go away, but I'm left with a little useless ghost window.

hypercwd

After a little troubleshooting (disabling every other plugin) I realized it was caused entirely by the initialWorkingDirectory option. I've attached a screenshot.

I'm on macOS and using oh-my-zsh.

hharnisc commented 7 years ago

Thanks so much for the report @bhardy - can definitely reproduce this! Digging into it now 😄

hharnisc commented 7 years ago

Hey @bhardy I figured out what was going on - it was creating a null session and Hyper never ends up destroying it. I submitted a PR to Hyper to fix this, so it might be a bit before it gets deployed to production. More details on that here: https://github.com/zeit/hyper/pull/2191

bhardy commented 7 years ago

@hharnisc, right on. Thanks again for the great plugin.

mhxbe commented 7 years ago

It seems that your pull-request already shipped with version 1.4.4 of Hyper. https://github.com/zeit/hyper/commits/1.4.4

Thanks a lot!