Sublime Forum

"create_window_at_startup" option ignored

#1

I’m on Mac and I’ve set

"create_window_at_startup": false

but Sublime Text still opens a new empty window on startup. Even when I launch the application by dragging a project’s folder on the Sublime Text icon in the dock, a blank window appears behind my procent’s window.

Can anyone confirm this, is it a bug or is there something wrong with my setup?

0 Likes

#2

It’s working fine here. Do note that Sublime Text will restore any windows you had open previously by default, so quitting the application with a window open will have the same window open when you start it again. You can disable this using the "hot_exit" setting.

0 Likes

#3

Thanks Benjamin, I’ve set "hot_exit": "disabled" as well, so that doesn’t seem to cause the issue.

I did some further testing and found out that it’s actually only on the first launch of ST after (re-)starting my Mac, a new blank window is created. Anyway, as this really isn’t a big thing I think we can put it aside. Thanks again!

0 Likes

#4

I’d like to continue this conversation a bit, because I’m having the same problem, and not just after starting my Mac. I have

"create_window_at_startup": false

but every time I open Sublime Text, either by launching the app or by clicking on a file, there is an extra blank window in the background.

(Incidentally, I used ST for years without this happening; it seemed to start happening suddenly a few months ago…)

Any ideas? Thanks!

0 Likes

#5

Does it happen in safe mode?

0 Likes

#6

Yes, the extra window always appears in safe mode.

Generally, the extra window appears most of the time, but not always. It’s pretty odd.

I was just running it from the command line (/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl), and then quitting, over and over, and the window didn’t appear. Then I opened a .txt file by double-clicking on it in Finder (Sublime is my default editor), and again the extra window didn’t appear. Then I quit and opened that .txt file again, and this time, the extra blank window did appear. And now the command line causes the extra window to appear consistently. Strange!

0 Likes

#7

I get the extra window at startup every time, despite having hot_exit and create_window_at_startup both set to false. This started with the upgrade to ST4 for me.

0 Likes

#8

I’m unable to reproduce this. Regardless of where I open ST from or what other settings are used it never creates an extra window at startup. Perhaps someone can provide a video of it happening?

0 Likes

#9

Hi @bschaaf, I made a screen recording of this. It turns out that a blank window only appears when there are open windows on quit. I tried to demonstrate this in my clip.

Please find the recording here: www.dropbox.com/s/z26fadnie7ocudg/sublime-text.mov

My settings:

	"hot_exit": "disabled",
	"create_window_at_startup": false,
0 Likes

#10

Thanks. We’ve got a fix for this in the works.

0 Likes

#11

Did you ever get this fixed? I’m using ST4 and I’m getting it and it’s driving me nuts to fix. :laughing:

I’m running Monterey on an iMac.

0 Likes

#12

Which version are you using?

0 Likes

#13

I’m using ST4

0 Likes

#14

He’s asking about the ST4 version/build number. You can get the build number by using either of the following

  1. Going to Help -> About Sublime Text ... from the main menu.
  2. Using Help: About from the command palette.
0 Likes

#15

I’m using 4121

0 Likes

#16

The changelog for 4122 doesn’t mention anything about create_window_at_startup (assuming it’s broken). Does it happen in safe mode ? https://www.sublimetext.com/docs/safe_mode.html#

0 Likes

#17

For me I wasn’t able to open it in safe mode by those methods. I was only allowed to do it by holding down “option” and clicking the app open. Booted it into safe mode and I have the same issue there.

For every file opened, a blank file opens behind it. Thanks.

0 Likes

#18

Turns out I forgot to submit the fix. It’s planned for release with 4123 now.

0 Likes

#19

This fix is now available in Build 4123

0 Likes

#20

Thank you. I’ll download that build.

0 Likes