diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2017-01-17 15:09:40 -0800 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2017-01-17 15:29:05 -0800 |
commit | fa51908b77f3209704f5834d59c352a755d137db (patch) | |
tree | d36fd437c00a8428899807ff07277871ce33ced4 /docs/source/usage | |
parent | 044c2c3362193e140cb7f7c40bfc6feb51a3243b (diff) |
commands/global: Don't double prompt to close last buffer
Currently if global.quit_on_last_bclose is set to True (not the default),
and the last buffer is an envelope, then when 'd' or ':bclose' is
called, the user will be prompted twice to 'close without sending?'.
This patch fixes that by skipping the prompt in BufferCloseCommand, if
there is 1 buffer, and global.quit_on_last_bclose is True. It does this
by adding a private keyword to the ExitCommand() constructor, telling
that classes apply method to not prompt.
Fixes #979
Diffstat (limited to 'docs/source/usage')
-rw-r--r-- | docs/source/usage/modes/global.rst | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/docs/source/usage/modes/global.rst b/docs/source/usage/modes/global.rst index a5526baa..f9f0b880 100644 --- a/docs/source/usage/modes/global.rst +++ b/docs/source/usage/modes/global.rst @@ -134,7 +134,12 @@ The following commands are available globally .. describe:: exit - shut down cleanly + Shut down cleanly. + + The _prompt variable is for internal use only, it's used to control + prompting to close without sending, and is used by the BufferCloseCommand + if settings change after yielding to the UI. + .. _cmd.global.flush: |