Only close buffers on quitall

This commit is contained in:
Adrian Wilkins 2018-03-26 13:24:05 +01:00
parent 2b7e6346a5
commit 15038d7b0c
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' description: 'When on, the ":substitute" flag \'g\' is default on'
type: 'boolean' type: 'boolean'
default: 'false' 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() atom.workspace.getActivePane().destroyActiveItem()
quitall: -> quitall: ->
atom.close() if !atom.config.get('ex-mode.onlyCloseBuffers')
atom.close()
else
atom.workspace.getTextEditors().forEach (editor) ->
editor.destroy()
q: => @quit() q: => @quit()