Merge remote-tracking branch 'Delapouite/prompt-idle'

This commit is contained in:
Maxime Coste 2017-07-08 13:33:44 +09:00
commit dbba047a8a
4 changed files with 8 additions and 3 deletions

View File

@ -966,7 +966,7 @@ Some options are built in Kakoune, and can be used to control its behaviour:
* `debug` _flags(hooks|shell|profile)_: dump various debug information in * `debug` _flags(hooks|shell|profile)_: dump various debug information in
the `*debug*` buffer. the `*debug*` buffer.
* `idle_timeout` _int_: timeout, in milliseconds, with no user input that will * `idle_timeout` _int_: timeout, in milliseconds, with no user input that will
trigger the `InsertIdle` and `NormalIdle` hooks. trigger the `PromptIdle`, `InsertIdle` and `NormalIdle` hooks.
* `fs_checkout_timeout` _int_: timeout, in milliseconds, between checks in * `fs_checkout_timeout` _int_: timeout, in milliseconds, between checks in
normal mode of modifications of the file associated with the current buffer normal mode of modifications of the file associated with the current buffer
on the filesystem. on the filesystem.
@ -1427,6 +1427,8 @@ Existing hooks are:
by the main selection is used for filtering by the main selection is used for filtering
* `InsertMove`: The cursor moved (without inserting) in insert mode, the key * `InsertMove`: The cursor moved (without inserting) in insert mode, the key
that triggered the move is used for filtering that triggered the move is used for filtering
* `PromptIdle`: A certain duration has passed since last key was pressed in
prompt mode.
* `WinCreate`: A window was created, the filtering text is the buffer name * `WinCreate`: A window was created, the filtering text is the buffer name
* `WinClose`: A window was destroyed, the filtering text is the buffer name * `WinClose`: A window was destroyed, the filtering text is the buffer name
* `WinDisplay`: A window was bound a client, the filtering text is the buffer * `WinDisplay`: A window was bound a client, the filtering text is the buffer

View File

@ -76,6 +76,9 @@ Default hooks
the cursor moved (without inserting) in insert mode, the key that the cursor moved (without inserting) in insert mode, the key that
triggered the move is used for filtering triggered the move is used for filtering
*PromptIdle*::
a certain duration has passed since last key was pressed in prompt mode
*WinCreate*:: *WinCreate*::
a window was created, the filtering text is the buffer name a window was created, the filtering text is the buffer name

View File

@ -137,7 +137,7 @@ Builtin options
*idle_timeout* 'int':: *idle_timeout* 'int'::
timeout, in milliseconds, with no user input that will trigger the timeout, in milliseconds, with no user input that will trigger the
*InsertIdle* and *NormalIdle* hooks. *PromptIdle*, *InsertIdle* and *NormalIdle* hooks.
*fs_checkout_timeout* 'int':: *fs_checkout_timeout* 'int'::
timeout, in milliseconds, between checks in normal mode of modifications timeout, in milliseconds, between checks in normal mode of modifications

View File

@ -766,7 +766,7 @@ static constexpr auto hooks = {
"BufWritePre", "BufOpenFifo", "BufCloseFifo", "BufReadFifo", "BufSetOption", "BufWritePre", "BufOpenFifo", "BufCloseFifo", "BufReadFifo", "BufSetOption",
"InsertBegin", "InsertChar", "InsertDelete", "InsertEnd", "InsertIdle", "InsertKey", "InsertBegin", "InsertChar", "InsertDelete", "InsertEnd", "InsertIdle", "InsertKey",
"InsertMove", "InsertCompletionHide", "InsertCompletionShow", "InsertMove", "InsertCompletionHide", "InsertCompletionShow",
"KakBegin", "KakEnd", "FocusIn", "FocusOut", "RuntimeError", "KakBegin", "KakEnd", "FocusIn", "FocusOut", "RuntimeError", "PromptIdle",
"NormalBegin", "NormalEnd", "NormalIdle", "NormalKey", "RawKey", "NormalBegin", "NormalEnd", "NormalIdle", "NormalKey", "RawKey",
"WinClose", "WinCreate", "WinDisplay", "WinResize", "WinSetOption", "WinClose", "WinCreate", "WinDisplay", "WinResize", "WinSetOption",
}; };