Sublime Forum

ST opens an extra window when opening document

#21

I can confirm the behavior seems to match what @farrol states—note that it doesn’t seem to create two windows when you open from Finder (Cmd+O or double-click), but it has like a ‘ghost window’ behind the active tab (named untitled) that you end up having to close after you close the document you just opened.

This has been bugging the heck out of me lately, enough to come here and post this animated gif of exactly the issue.

My current preferences file is here: https://github.com/geerlingguy/mac-dev-playbook/blob/master/files/sublime/Preferences.sublime-settings

I have both:

  "close_windows_when_empty": true,
  "create_window_at_startup": false,

And I’m running build 4121 on macOS 11.6.

Here’s the gif:

In the first example, I double-click to open the file, then click the close icon on the tab. An untitled window is left in place that I also have to close.

In the second example, I double-click to open the file, then press Command-W to close the file. An untitled window is left in place that I also have to close.

0 Likes

#22

That’s a separate issue and will be fixed in the next build: https://github.com/sublimehq/sublime_text/issues/4808

1 Like

#23

Hi, this is still happening for me on macOS 13, Sublime Text build 4126. Was the problem supposed to be fixed in this build?

Here are my user preferences:
“hot_exit”: “disabled”,
“close_windows_when_empty”: true,

0 Likes

#24

I’m unable to reproduce the issue with those settings in dev build 4140.

0 Likes

#25

Same here. I had to upgrade to Monterey (v12.6.1) and since than, Sublime Text b4126 is opening 1 additional “untitled” window when I open a file from Finder while ST is not running. Looking for a solution I stumbled on this thread.

0 Likes

#26

I began noticing this behavior after an update within the last couple of weeks. Unfortunately, I can’t be any more specific than that. Currently, I’m on build 4116 on both Windows & Linux.

0 Likes

#27

This issue is being tracked at: https://github.com/sublimehq/sublime_text/issues/5675.

It’s likely that you’re not seeing an extra Window but instead a separate application instance. This is usually the result of ST being launched incorrectly by a 3rd part plugin or app.

0 Likes

#28

Issue still happening after the update to build 4143 for me today, and I don’t think it’s the issue above.

Double-clicked a text file in Finder from my Downloads folder, it opened in Sublime Text, with a blank window opening behind it, but only one Sublime Text icon in the app switcher:

0 Likes

#29

I was unable to put more than 1 image in a post, but additionally, there is only one Sublime Text process in Activity Monitor:

image

0 Likes

#30

I’m able to reproduce that; though it’s unrelated to the above issue.

1 Like

#31

I’m curious–what changed between now and in your previous post where you said you were unable to reproduce the issue in dev build 4140? Was it fixed in 4140 and broke again in 4143?

0 Likes

#32

I was likely checking the command line tool, not finder. Those are two different code paths.

1 Like

#34

Just a quick note that this is still happening for me on macOS Monterey 12.6.1 and Sublime Text b4143. Double clicking a text file from the Finder (and Path finder) opens an additional “untitled” window.

0 Likes