From a7809d67728932499130a30cf9ee4e3e6edf08a9 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Fri, 20 Nov 2015 16:40:55 +0100 Subject: [PATCH] Add 'Close Empty Windows' option.' --- src/config-schema.coffee | 8 ++++++-- src/workspace.coffee | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/config-schema.coffee b/src/config-schema.coffee index 08956d470..d9c0c1d21 100644 --- a/src/config-schema.coffee +++ b/src/config-schema.coffee @@ -21,7 +21,6 @@ module.exports = followSymlinks: type: 'boolean' default: true - title: 'Follow symlinks' description: 'Follow symbolic links when searching files and when opening files with the fuzzy finder.' disabledPackages: type: 'array' @@ -54,7 +53,12 @@ module.exports = destroyEmptyPanes: type: 'boolean' default: true - description: 'When the last item of a pane is removed, remove that pane as well.' + title: 'Remove Empty Panes' + description: 'When the last tab of a pane is closed, remove that pane as well.' + closeEmptyWindows: + type: 'boolean' + default: true + description: 'When a window with no open tabs or panes is given the \'Close Tab\' command, close that window.' fileEncoding: description: 'Default character set encoding to use when reading and writing files.' type: 'string' diff --git a/src/workspace.coffee b/src/workspace.coffee index bfa013018..704b0e8a4 100644 --- a/src/workspace.coffee +++ b/src/workspace.coffee @@ -682,7 +682,7 @@ class Workspace extends Model @destroyActivePaneItem() else if @getPanes().length > 1 @destroyActivePane() - else + else if @config.get('core.closeEmptyWindows') atom.close() # Increase the editor font size by 1px.