Sublime Forum

Command line vs untitled

#21

About Sublime and Check for Updates screenshot

0 Likes

#22

I’m still unable to reproduce:

0 Likes

#23

Ah! The recording helped narrow down the problem. I should have mentioned that I have aliased “subl” to be:
alias subl='open -a "Sublime Text"'

Perhaps when running “subl” with my alias, it is opening an empty Sublime window along with the window for the “.” folder.

Running the subl command using the direct bath to binary like you did gets rid of the issue. Thank you very much!

0 Likes

#24

I have the same extra-empty-window problem when opening a .ps file by Finder double-click.

It feels like a recent problem, starting perhaps this summer, and still present in 4121.

0 Likes

#25

Is ST already running when you do this? Are “hot_exit” and “remember_open_files” enabled/disabled? I can’t reproduce it here fwiw.

0 Likes

#26

I had this issue too with 4121 and MacOS 12.01, but resolved by using this in the settings:
“create_window_at_startup”: false

After opening a file I would only have one window now, but if I close it (CMD+W) an untitled empty window still remains and I have to close that too otherwise the next time Sublime opens I will have that empty window around. Anyone knows how to get around this?

0 Likes

#27

I have the same issue, build 4121 in MacOS.

I use Sublime as my Git commit message editor. When ever I save & close Sublime after editing a git commit message, an empty Sublime window with “untitled” stays.

I have the following user settings:
“create_window_at_startup”: false,
“close_windows_when_empty”: true

Steps to reproduce:

  • Have no instances of Sublime running
  • Open a file in Sublime like git would do: “subl -w lolcat.txt”
  • Write something, save (cmd-S) and close window (cmd-W)
  • You have “lolcat.txt” written, editor tab did close BUT there’s an empty window with “untitled” still visible.
  • Expected behaviour: The window for “lolcat.txt” would close and there would NOT be an empty Sublime window visible for “Untitled”.

In an earlier Sublime version (still a year-2021 version I guess, not sure) closing the window with cmd-W did also close the empty window (without having to quit Sublime completely with cmd-Q).

0 Likes

#28

Does the same thing happen in build 4126?

0 Likes