-
-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new_window_on_connect: Don't always spawn a new window #35
Comments
I like the idea about reusing "closed" views in existing windows rather than creating a new one, but don't expect a quick implementation because my current focus lies on: Cacodaimon/GhostText-for-Chrome#26 . |
That's fine. Take all the time you need. Thanks for the response! |
From what I remember GT already reuses inactive GT-Sublime tabs if that option is disabled. Try just disabling it and moving a GT-Sublime tab to its own window to have a behavior similar to what you want. |
No currently when |
I took the time to make some thoughts about this issue. The main problem is that ST has no method to focus (bring to top) a window, therefore we had to build https://github.com/Cacodaimon/GhostText-for-SublimeText/blob/master/FocusSublimeWindow.py which uses some OS tools like The idea behind Reusing an "empty" window would be possible but we are currently not able to ensure that the right window gets focused, so I'm thinking that this issue is currently not feasible although I like your idea. Maybe we can reopen this issue when ST extends it's API. |
I understand your decision. Thanks for the comment! |
Maybe this feature come very close to your needs: #39 |
Thanks for the heads-up! I will give it a try over the next few days. |
@Cacodaimon |
Hey guys,
I've been using the
new_window_on_connect
option for the past couple of weeks now. It's a very useful feature to have if you use GhostText while working on a different project.I do feel that the way new Sublime instances are spawned could be improved, though. Most importantly, I don't think that GhostText should open a new window under the following circumstances:
Connection to text field has already been established at least once.
Currently if you start editing a text field, then close the connection and reconnect, a new empty Sublime window is spawned. So while GhostText does reestablish the right connection, it opens and focuses an unnecessary new window
Only existing Sublime Text instance is empty.
If you aren't working on something else before, you have to launch a new instance to be able to establish the connection. Even if this instance is empty GhostText will launch a new window when establishing the connection. A better solution, if feasible, would be to use the existing empty ST instance.
Thank you very much for considering this.
BR, Feltzer
The text was updated successfully, but these errors were encountered: