1
0
forked from aniani/vim

patch 8.2.2128: there is no way to do something on CTRL-Z

Problem:    There is no way to do something on CTRL-Z.
Solution:   Add VimSuspend and VimResume autocommand events. (closes #7450)
This commit is contained in:
Bram Moolenaar
2020-12-11 19:30:34 +01:00
parent 1b884a0053
commit 100118c73a
7 changed files with 67 additions and 1 deletions

View File

@@ -306,6 +306,9 @@ Name triggered by ~
|VimLeavePre| before exiting Vim, before writing the viminfo file
|VimLeave| before exiting Vim, after writing the viminfo file
|VimSuspend| when suspending Vim
|VimResume| when Vim is resumed after being suspended
Terminal
|TerminalOpen| after a terminal buffer was created
|TerminalWinOpen| after a terminal buffer was created in a new window
@@ -1231,6 +1234,17 @@ VimLeavePre Before exiting Vim, just before writing the
VimResized After the Vim window was resized, thus 'lines'
and/or 'columns' changed. Not when starting
up though.
*VimResume*
VimResume When the Vim instance is resumed after being
suspended and |VimSuspend| was triggered.
Useful for triggering |:checktime| and ensure
the buffers content did not change while Vim
was suspended: >
:autocmd VimResume * checktime
< *VimSuspend*
VimSuspend When the Vim instance is suspended. Only when
CTRL-Z was typed inside Vim, not when the
SIGSTOP or SIGTSTP signal was sent to Vim.
*WinEnter*
WinEnter After entering another window. Not done for
the first window, when Vim has just started.