from the pref
// Set to true to close windows as soon as the last file is closed, unless
// there's a folder open within the window.
// On OS X, this value is overridden in the platform specific settings, so
// you'll need to place this line in your user settings to override it.
"close_windows_when_empty": false,
it used to work exactly as the comment says, but now even if i have a folder opened in the sidebar, using cmd+w still close the window.
osx 10.11.6
st 3165