Sublime Forum

Defective OS X anonymous projects - broken layout, search history behaviour

#21

This sounds like a depressing weekend project I shall have to partake in.

1 Like

#22

Iā€™m a little tired and grumpy this morning, so Iā€™ll pre-apologize for being a bit gruff; I donā€™t mean anything by it.

I skimmed over this to see if I could help since Iā€™ve learned more than I really wanted to know about projects/workspaces and macOS is my daily driver. I have my own gripes with the built-in project/workspace management stuff, but Iā€™m having a really hard time seeing what the problem is, here.

Hot exit works. I use it all the time. Depending on what Iā€™m doing, Iā€™ve had hundreds of files open in dozens of windows with a mix of almost every column/row layout combination possible. They always restore.

If hot_exit is enabled:

  1. Open ST3
  2. Change the layout. You can use CMD+OPTION+2.
  3. Open some files. Open some more windows. Open whatever you like.
  4. When youā€™re done, hit CMD+Q to quit ST3.
  5. Re-open ST3, and everything will still be in place. (This seems to meet the most-lucid single statement Iā€™ve seen as to what you expect: ā€œI just want an editor I can literally open and everything is there.ā€)

My only real complaint about how this works is that all of the windows will reopen on a single Space/desktop, so Iā€™ll have to go back and spread them out into groups.

1 Like

#23

As I have already explained on this thread, the issue seems to be with the new to ST3 handling of closing windows within macOS.

ST2 kept search history and window layout, ST3 discards it. For more information, please refer yourself to the videos which I have previously uploaded.

0 Likes

#24

Sorry for not watching the video before; it isnā€™t working for me in Safari. It did in Chrome, though.

The video, of course, confirms what everyone is telling you: if you want the window open next time, quit.

Hot exit, as an idiom, means the application should open in roughly the same state it was last in. If you quit a program with open windows and open tabs, it will open with those windows and tabs. Quitting the application without closing its windows is the canonical way to achieve the behavior youā€™re asking for.

If you close the windows before you quit the application, and then quit the application with no windows open, youā€™re no longer describing hot-exit behavior. Youā€™re describing, ā€œif I quit with absolutely nothing open, please ignore my actions and reopen something I already closed.ā€ If the application behaved that way, other users could just as reasonably complain about the application reopening with a window (including tabs and unsaved buffers) even though they had intentionally closed and clicked through do-not-save-this-file/changes dialogs. This behavior would mean unsaved buffers the user intentionally closed and said not to save were nonetheless persisted to disk. This is not the canonical way to achieve what youā€™re asking for. Iā€™m not sure why this changed between 2 and 3, but I would immediately and aggressively advocate for fixing this behavior if I noticed it.

AFAIR this behavior is consistent with every other hot-exiting macOS app I use. Iā€™d be absolutely apoplectic if I opened a temporary Terminal window, intentionally disabled command history to do some sensitive work, closed the window to prevent it from being saved by hot-exit behavior, only to find the scrollback pop up the next time I opened Terminal.

0 Likes

#25

I understand what everyone is saying about hot_exit thus Iā€™ve changed the title to better reflect what this regression is.

0 Likes

#26

But itā€™s still a regression, and most certainly a poor design choice at that.

1 Like

#27

I have went through the API and I canā€™t seem to find any functionality that would allow me to inspect workspaces, just projects.

Is there a hidden API that one could use for this perhaps, @OdatNurd, @wbond?

1 Like

#28

If I understand your qualm correctly (that closing the last window doesnā€™t invoke hot_exit, whereas quitting the app does), I donā€™t consider this a regression, but rather a conscious decision to have Sublime Text 3 work like a well-behaved Mac app.

I think you just need to press cmd+Q rather than close the window?

0 Likes

#29

Respectfully, we appear to disagree.

And sadly (for me), other editors appear to be in agreement with the route which Sublime Text 3 has gone down - this morning I tried the latest released versions of Atom and VCode and they had roughly the same behaviour out of the box.

Due to time constraints I wasnā€™t able to delve deeper into the configuration to see whether or not what I wanted to do was possible however.

Thus, how does one proceed from here?

As a temporary stop gap measure, Iā€™ve disabled close_windows_when_empty in my user config which is curing most of my frustrations (no longer losing regular expressions!) I wouldnā€™t necessarily call this the final fix.

Or how about I donā€™t?

I do apologise if throughout this thread, the previous thread and the GitHub ticket I seem to have been a tad argumentative but it is quite disappointing when core features like this are changed without any consultation with its users.

This reason alone was why I stayed with the delightful Sublime Text 2 for an extra 4 years after ST3 first went to open beta.

Even one of the comments on this very thread alluded to this:

Thus, Iā€™d like to politely put forward a request that either:

  • this functionality is re-introduced as an option in the configuration (which would default to being disabled to keep current behaviour)
  • additional API functionality is provided to allow an end user to create a plugin that would re-add in this functionality

Thank you.

1 Like

#30

Is there a pragmatic reason for refusing to use CMD+Q, or is this objection just on principle?

1 Like

#31

I would say that having the behaviour that existed in a previous version of Sublime Text is entirely pragmatic.

0 Likes

#32

Sorry, but I canā€™t not link this:

6 Likes

#33

ā€œyour update murders childrenā€ is even funnier given that some of my clients are charities that work with children

0 Likes