From 85b8810660ffa37eb2d3edf85a4dbf12ba5f1ca3 Mon Sep 17 00:00:00 2001
From: mitchell <70453897+orbitalquark@users.noreply.github.com>
Date: Sun, 1 Nov 2020 23:30:43 -0500
Subject: 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.
---
docs/api.md | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
(limited to 'docs')
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`
-#### `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.
--
cgit v1.2.3