Set APPLICATION_NON_UNIQUE.
This causes the application to start new instances in their own processes instead of using the primary instance for all windows. I feel this is a more natural behaviour for vim as the instances aren't really related. It also has the advantage, that crashing instances don't crash other instances and that new instances correctly set their current working directory to the one they were started from instead of reusing the cwd of the primary instance.
Introduce new-window action.
Add a "New Window" entry to the menu. Also, Gnome checks for this action when trying to figure out whether the application can open a new window. For example the dash-to-dock extension looks at this when the application is middle-clicked and doesn't launch a new instance if can_open_new_window returned false.
Update: I just saw https://github.com/daa84/neovim-gtk/issues/19. You mentioned that one could open files in the same window instead of new ones. Is this currently supported, i.e. does my change break with this?
Hello
about #19 it is just idea, i'm not implement it or work on it. Currently it start new neovim instance for every window. So i think your solution is ok.
These are two weakly related changes:
Set
APPLICATION_NON_UNIQUE
. This causes the application to start new instances in their own processes instead of using the primary instance for all windows. I feel this is a more natural behaviour for vim as the instances aren't really related. It also has the advantage, that crashing instances don't crash other instances and that new instances correctly set their current working directory to the one they were started from instead of reusing the cwd of the primary instance.Introduce
new-window
action. Add a "New Window" entry to the menu. Also, Gnome checks for this action when trying to figure out whether the application can open a new window. For example the dash-to-dock extension looks at this when the application is middle-clicked and doesn't launch a new instance ifcan_open_new_window
returned false.Update: I just saw https://github.com/daa84/neovim-gtk/issues/19. You mentioned that one could open files in the same window instead of new ones. Is this currently supported, i.e. does my change break with this?