Sublime Forum

3114 "subl -n" doesn't work on Ubuntu

#1

After updating to 3114, when I run “subl -n” from the command line, it doesn’t open a new window if a window of sublime is already open. Any tips on getting this to work? I’m on Unity, Ubuntu 14.04.

0 Likes

3114 Ubuntu 14.04 64bit ST3 doesn't show text at all
#2

Does the File menu -> New Window command work for you? Just trying to establish the scope of the problem :slight_smile:

0 Likes

#3

I can also reproduce this but with the i3 window manager both with and without compositing. However if I change the tiling layout ST is able to draw again.

0 Likes

#4

Ok, I did some investigating:

  1. If an ST window is open without any project, then subl -n always opens a tab in the existing window instead of opening a new one.
  2. If an ST Window is open with a project, then subl -n always opens a new window but that window has a high chance of being frozen until a resize event occurs e.g. the change in tiling layout I mentioned above.

I’m on dev build 3113 but I think I’ve seen this since build 3112 at least.

0 Likes

#5

Ah yes, that’s what I was seeing too. Now that I have projects open, it works as expected.

Keith: File -> New Window works as expected in either circumstance.

0 Likes

#6

I couldn’t reproduce the freezing problem with Unity or cinnamon. I’ve filed an i3 bug for now but I suspect the problem is a race condition in ST3 where an X11 expose event is handled at the wrong time corrupting some internal state. Unity and cinnamon do not resize a window immediately when it’s created but i3 being a tiling manager does. Given that this does not happen always points to a race condition. What is interesting is that I can interact with the menu bar and other subwindows while the main window is frozen.

0 Likes

3114 Ubuntu 14.04 64bit ST3 doesn't show text at all
#7

Oh sorry, I misread your comment. I wasn’t seeing freezing in Unity. I was just seeing that “subl -n” wasn’t working before, but now that I have a ton of stuff open (and was using File -> New Window to create new windows), it works as expected. I haven’t restarted since I first saw the issue.

0 Likes

#8

How about subl --command new_window?

0 Likes

#9

That works without freezing and so does subl -n && subl filename. Only subl -n filename causes a freeze most of the time.

0 Likes