aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+orbitalquark@users.noreply.github.com>2020-10-12 11:51:59 -0400
committerGravatar mitchell <70453897+orbitalquark@users.noreply.github.com>2020-10-12 11:51:59 -0400
commitcc311dcf72be1792da063c10e453cb294fefcc3c (patch)
tree1045aa1b08ac3fa2ce3efb370c7d64fb1692503d /modules
parent0ebd2624ae677ecd4b58c8e4abd37618ab5bb0c2 (diff)
Updated LuaDoc for `ui.command_entry.append_history()`.
Clarify that it's not normally needed.
Diffstat (limited to 'modules')
-rw-r--r--modules/lua/ta_api2
-rw-r--r--modules/textadept/command_entry.lua3
2 files changed, 4 insertions, 1 deletions
diff --git a/modules/lua/ta_api b/modules/lua/ta_api
index a7db7a60..c5e573e6 100644
--- a/modules/lua/ta_api
+++ b/modules/lua/ta_api
@@ -333,7 +333,7 @@ ansi_c _G.snippets.ansi_c (table)\nTable of C-specific snippets.
ansi_c _M.ansi_c (module)\nThe ansi_c module.\nIt provides utilities for editing C code.
any lexer.any (pattern)\nA pattern that matches any single character.
api_files textadept.editing.api_files (table)\nMap of lexer names to API documentation file tables.\nFile tables contain API file paths or functions that return such paths.\nEach line in an API file consists of a symbol name (not a fully qualified\nsymbol name), a space character, and that symbol's documentation. "\\n"\nrepresents a newline character.\n@see show_documentation
-append_history ui.command_entry.append_history(text)\nAppends the given text to the history for the current or most recent command\nentry mode.\n@param text String text to append to history.
+append_history ui.command_entry.append_history(text)\nAppends the given text to the history for the current or most recent command\nentry mode.\nThis should only be called if `ui.command_entry.run()` is called with a keys\ntable that has a custom binding for the Enter key ('\\n').\nOtherwise, history is automatically appended as needed.\n@param text String text to append to history.
append_text buffer.append_text(buffer, text)\nAppends string *text* to the end of the buffer without modifying any existing\nselections or scrolling the text into view.\n@param buffer A buffer.\n@param text The text to append.
arg _G.arg (table)\nTable of command line parameters passed to Textadept.\n@see args
args _G.args (module)\nProcesses command line arguments for Textadept.
diff --git a/modules/textadept/command_entry.lua b/modules/textadept/command_entry.lua
index 5c30394e..f6a82baa 100644
--- a/modules/textadept/command_entry.lua
+++ b/modules/textadept/command_entry.lua
@@ -37,6 +37,9 @@ end
---
-- Appends the given text to the history for the current or most recent command
-- entry 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.
-- @param text String text to append to history.
-- @name append_history
function M.append_history(text)