From 0ebd2624ae677ecd4b58c8e4abd37618ab5bb0c2 Mon Sep 17 00:00:00 2001
From: mitchell <70453897+orbitalquark@users.noreply.github.com>
Date: Mon, 12 Oct 2020 10:43:30 -0400
Subject: Added `ui.command_entry.append_history()` for manually appending
history. Normally history is auto-appended by the default '\n' key handler,
but some custom modes may have their own '\n' handlers and did not have a way
to append history.
---
docs/api.md | 10 ++++++++++
docs/manual.md | 2 ++
2 files changed, 12 insertions(+)
(limited to 'docs')
diff --git a/docs/api.md b/docs/api.md
index b601efad..f3f8b180 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -7996,6 +7996,16 @@ The height in pixels of the command entry.
### Functions defined by `ui.command_entry`
+
+#### `ui.command_entry.append_history`(*text*)
+
+Appends the given text to the history for the current or most recent command
+entry mode.
+
+Parameters:
+
+* *`text`*: String text to append to history.
+
#### `ui.command_entry.focus`()
diff --git a/docs/manual.md b/docs/manual.md
index 4fce4653..1efe9acc 100644
--- a/docs/manual.md
+++ b/docs/manual.md
@@ -1916,6 +1916,7 @@ N/A |Added |[highlight_all_matches][]
bufstatusbar\_text |Renamed |[buffer_statusbar_text][]
**ui.command_entry** | |
N/A |Added |[active][]
+N/A |Added |[append_history][]
**ui.dialogs** | |
N/A |Added |[progressbar()][]
**ui.find** | |
@@ -1962,6 +1963,7 @@ section below.
[paths]: api.html#textadept.snippets.paths
[buffer_statusbar_text]: api.html#ui.buffer_statusbar_text
[active]: api.html#ui.command_entry.active
+[append_history]: api.html#ui.command_entry.append_history
[progressbar()]: api.html#ui.dialogs.progressbar
##### Buffer Indexing Changes
--
cgit v1.2.3