rogual / neovim-dot-app

Mac OS X GUI for Neovim
1.13k stars 62 forks source link

Show only one app icon in Mac dock. #226

Closed towry closed 8 years ago

towry commented 8 years ago

It seems there is no "new window" option of the app in the mac docker, when I open two neovim-dot-app, there will be two app icon in the docker, I think it would be better to group all the opened app into one icon in the docker.

rogual commented 8 years ago

This is with gnvim, right? If you use Cmd+N you should just have the one icon. Agreed this should be fixed.

robguthrie commented 8 years ago

Is this a matter of modifying gnvim? or should this be done on Neovim.app itself? Looking to the core devs to understand what the best way to do this is.

IE: Should I modify gnvim so it saves a PID, then check for existance of the PID to decide how to run? If so, how should Neovim.app be run from the command line in a way that opens new window?

rogual commented 8 years ago

Just looked into this — we had -n as an argument to open in gnvim which always forced a new instance, as a workaround for some bug.

This isn't a good workaround if it causes this new issue, which is more annoying. So, I have reverted this in https://github.com/rogual/neovim-dot-app/commit/2e5226b4cabfd732cd2d09fe2623300215a18cdb — try now.

robguthrie commented 8 years ago

Thanks @rogual. I've just removed the -n locally, but the behaviour is not correct. If Neovim.app is open, then the window is focused but no new file is opened.

So it will open a file if it's not already running, but it won't open a new file specified as first argument, if it's already running.

rogual commented 8 years ago

See latest couple of commits — should solve it.

On 26 Jun 2016, at 21:52, Robert Guthrie notifications@github.com wrote:

Thanks @rogual https://github.com/rogual. I've just removed the -n locally, but the behaviour is not correct. If Neovim.app is open, then the window is focused but no new file is opened.

So it will open a file if it's not already running, but it won't open a new file specified as first argument, if it's already running.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rogual/neovim-dot-app/issues/226#issuecomment-228622080, or mute the thread https://github.com/notifications/unsubscribe/AAfylxJA_y3puaiQeKdq_GIYpt20pvEkks5qPuZ1gaJpZM4H0oX_.

robguthrie commented 8 years ago

Arrrh. Magic. So much better. Thank you!