diff options
author | mitchell <70453897+orbitalquark@users.noreply.github.com> | 2020-11-01 23:30:43 -0500 |
---|---|---|
committer | mitchell <70453897+orbitalquark@users.noreply.github.com> | 2020-11-01 23:30:43 -0500 |
commit | 85b8810660ffa37eb2d3edf85a4dbf12ba5f1ca3 (patch) | |
tree | c364b17b99c60326e7c85278c29ffc2c6584f598 /docs | |
parent | 2ec90788dc08346d74a79877a35f91c74d661688 (diff) |
Added optional mode parameter to `ui.command_entry.append_history()`.
This allows for arbitrary appending to history, not just for the current or
most recent mode.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/api.md | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/docs/api.md b/docs/api.md index 9152aca2..8405ff84 100644 --- a/docs/api.md +++ b/docs/api.md @@ -8022,16 +8022,19 @@ The height in pixels of the command entry. ### Functions defined by `ui.command_entry` <a id="ui.command_entry.append_history"></a> -#### `ui.command_entry.append_history`(*text*) +#### `ui.command_entry.append_history`(*f, text*) -Appends the given text to the history for the current or most recent command -entry mode. +Appends string *text* to the history for command entry mode *f* or the +current or most recent mode. This should only be called if `ui.command_entry.run()` is called with a keys table that has a custom binding for the Enter key ('\n'). Otherwise, history is automatically appended as needed. Parameters: +* *`f`*: Optional command entry mode to append history to. This is a function + passed to `ui.command_entry_run()`. If omitted, uses the current or most + recent mode. * *`text`*: String text to append to history. <a id="ui.command_entry.focus"></a> |