summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2017-07-08 13:33:44 +0900
committerMaxime Coste <mawww@kakoune.org>2017-07-08 13:33:44 +0900
commitdbba047a8a7094d4df542bb22704c9bed39e38dd (patch)
tree7fd957542f8524daf9bcdaef64971230da169da4
parentad1dad9d04a8607608aa82d311ad3a74c0b29409 (diff)
parent8ed29dbd7a2e2d0a0f50d8be538de19676a356a2 (diff)
Merge remote-tracking branch 'Delapouite/prompt-idle'
-rw-r--r--README.asciidoc4
-rw-r--r--doc/manpages/hooks.asciidoc3
-rw-r--r--doc/manpages/options.asciidoc2
-rw-r--r--src/commands.cc2
4 files changed, 8 insertions, 3 deletions
diff --git a/README.asciidoc b/README.asciidoc
index d0b4091e..9a76096c 100644
--- a/README.asciidoc
+++ b/README.asciidoc
@@ -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
the `*debug*` buffer.
* `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
normal mode of modifications of the file associated with the current buffer
on the filesystem.
@@ -1427,6 +1427,8 @@ Existing hooks are:
by the main selection is used for filtering
* `InsertMove`: The cursor moved (without inserting) in insert mode, the key
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
* `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
diff --git a/doc/manpages/hooks.asciidoc b/doc/manpages/hooks.asciidoc
index 068464b2..955a30d9 100644
--- a/doc/manpages/hooks.asciidoc
+++ b/doc/manpages/hooks.asciidoc
@@ -76,6 +76,9 @@ Default hooks
the cursor moved (without inserting) in insert mode, the key 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
diff --git a/doc/manpages/options.asciidoc b/doc/manpages/options.asciidoc
index 3e622aa3..aad4b508 100644
--- a/doc/manpages/options.asciidoc
+++ b/doc/manpages/options.asciidoc
@@ -137,7 +137,7 @@ Builtin options
*idle_timeout* 'int'::
timeout, in milliseconds, with no user input that will trigger the
- *InsertIdle* and *NormalIdle* hooks.
+ *PromptIdle*, *InsertIdle* and *NormalIdle* hooks.
*fs_checkout_timeout* 'int'::
timeout, in milliseconds, between checks in normal mode of modifications
diff --git a/src/commands.cc b/src/commands.cc
index bf92a628..199e768a 100644
--- a/src/commands.cc
+++ b/src/commands.cc
@@ -766,7 +766,7 @@ static constexpr auto hooks = {
"BufWritePre", "BufOpenFifo", "BufCloseFifo", "BufReadFifo", "BufSetOption",
"InsertBegin", "InsertChar", "InsertDelete", "InsertEnd", "InsertIdle", "InsertKey",
"InsertMove", "InsertCompletionHide", "InsertCompletionShow",
- "KakBegin", "KakEnd", "FocusIn", "FocusOut", "RuntimeError",
+ "KakBegin", "KakEnd", "FocusIn", "FocusOut", "RuntimeError", "PromptIdle",
"NormalBegin", "NormalEnd", "NormalIdle", "NormalKey", "RawKey",
"WinClose", "WinCreate", "WinDisplay", "WinResize", "WinSetOption",
};