After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 747939 - Opening files from the command line always creates a new window
Opening files from the command line always creates a new window
Status: RESOLVED DUPLICATE of bug 733577
Product: gedit
Classification: Applications
Component: general
3.16.x
Other Linux
: Normal normal
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2015-04-15 18:32 UTC by Simon Sapin
Modified: 2015-04-18 08:49 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Simon Sapin 2015-04-15 18:32:02 UTC
Steps to reproduce:

* Open gnome-terminal.
* Type `touch a b`. (Or somehow have two text files that exist.)
* Type `gedit a`.
* A gedit window editing `a` is opened. Focus back on gnome-terminal.
* Type `gedit b`.

Expected result (i.e. result up to GNOME 3.14): a new tab is opened for `b` in the existing gedit window. (In general, an existing window is used only if it is in the same workspace.)

Actual result (since upgrading to 3.16): a new gedit window is created, editing `b`.

I’m using GNOME and GNOME Shell on Archlinux.
Comment 1 sébastien lafargue 2015-04-15 18:57:14 UTC
Hi, everything work fine for me on fedora rawhide, both with Gedit from the system and from jhbuild too.

I have also tried with gedit a & then gedit b & and also from two different terminal.

In each cases, it open a tab on the already opened window for the files loaded after the first one.
Comment 2 Simon Sapin 2015-04-15 20:05:41 UTC
Thanks for your response. I’ve managed to have a document open as a new tab in an existing window, but I’ve also managed to reproduce the issue again.

I’ve tried multiple things: opening from Nautilus instead of a terminal, opening files not in the current directory (with a slash in the gedit command line), opening files of different types, varying the time between opens (with `gedit a; sleep 1; gedit b`) but in all cases I’ve seen both the issue and the correct behavior.

So it looks random, and I haven’t found a criteria to deterministically get one behavior or the other :/
Comment 3 Sébastien Wilmet 2015-04-17 18:51:05 UTC
It's maybe a duplicate of bug #733577.
Comment 4 Sébastien Wilmet 2015-04-17 18:51:45 UTC
Or, do you use Wayland?
Comment 5 Simon Sapin 2015-04-18 08:49:38 UTC
I don’t use Wayland, but bug #733577 sounds very likely as my window are usually "half maximized" (Super + left/right arrow). In fact, I’ve managed to reliably reproduce the issue with half-maximized windows, and reliably *not* reproduce it with non-maximized windows. Interestingly, I can *not* reproduce the issue with fully maximized windows either.

(I also use https://github.com/wilfm/GnomeExtensionMaximusTwo/ , although that doesn’t affect gedit which doesn’t have an old-style title bar. I’ve also reproduced the issue with this extension disabled.)

Closing as duplicate of 733577.

*** This bug has been marked as a duplicate of bug 733577 ***