Merge pull request #209 from awilkins/only-close-buffers

Only close buffers on quitall
This commit is contained in:
Edvin Hultberg 2018-05-03 21:20:16 +02:00 committed by GitHub
commit b9b3ba3e9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View file

@ -55,3 +55,8 @@ module.exports = ExMode =
description: 'When on, the ":substitute" flag \'g\' is default on'
type: 'boolean'
default: 'false'
onlyCloseBuffers:
title: 'Only close buffers'
description: 'When on, quitall only closes all buffers, not entire Atom instance'
type: 'boolean'
default: 'false'

View file

@ -132,7 +132,11 @@ class Ex
atom.workspace.getActivePane().destroyActiveItem()
quitall: ->
atom.close()
if !atom.config.get('ex-mode.onlyCloseBuffers')
atom.close()
else
atom.workspace.getTextEditors().forEach (editor) ->
editor.destroy()
q: => @quit()