aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--core/.buffer.luadoc2
-rw-r--r--core/.view.luadoc8
-rw-r--r--core/events.lua4
-rw-r--r--docs/api.md14
-rw-r--r--modules/lua/ta_api12
-rw-r--r--modules/textadept/command_entry.lua2
6 files changed, 23 insertions, 19 deletions
diff --git a/core/.buffer.luadoc b/core/.buffer.luadoc
index 8253f22a..e2d45e71 100644
--- a/core/.buffer.luadoc
+++ b/core/.buffer.luadoc
@@ -834,7 +834,7 @@ function get_text(buffer) end
---
-- Moves the caret to the beginning of line number *line* and scrolls it into
--- view, regardless of whether or not *line* is hidden.
+-- view, event if *line* is hidden.
-- @param buffer A buffer.
-- @param line The line number in *buffer* to go to.
function goto_line(buffer, line) end
diff --git a/core/.view.luadoc b/core/.view.luadoc
index 11b0c6ca..8fb460de 100644
--- a/core/.view.luadoc
+++ b/core/.view.luadoc
@@ -60,7 +60,7 @@
-- @field call_tip_fore_hlt (number, Write-only)
-- A call tip's highlighted text foreground color, in "0xBBGGRR" format.
-- @field call_tip_pos_start (number, Write-only)
--- The position in which backspacing beyond it hides a visible call tip.
+-- The position at which backspacing beyond it hides a visible call tip.
-- @field call_tip_position (boolean)
-- Display a call tip above the current line instead of below it.
-- The default value is `false`.
@@ -460,7 +460,8 @@
-- The alternative string representations of characters.
-- Representations are displayed in the same way control characters are. Use
-- the empty string for the '\0' character when assigning its representation.
--- Characters are strings, not numeric codes.
+-- Characters are strings, not numeric codes, and can be multi-byte
+-- characters.
-- Call [`view.clear_representation()`]() to remove a representation.
-- @field rgba_image_height (number)
-- The height of the RGBA image to be defined using
@@ -1027,7 +1028,8 @@ function call_tip_show(view, pos, text) end
function clear_registered_images(view) end
---
--- Removes the alternate string representation for character *char*.
+-- Removes the alternate string representation for character *char* (which may
+-- be a multi-byte character).
-- @param view A view.
-- @param char The string character in `buffer.representations` to remove the
-- alternate string representation for.
diff --git a/core/events.lua b/core/events.lua
index 6f29e0a1..ddf1354c 100644
--- a/core/events.lua
+++ b/core/events.lua
@@ -231,14 +231,14 @@ local M = {}
-- * _`find_text`_: The text to search for.
-- * _`repl_text`_: The replacement text.
-- @field RESET_AFTER (string)
--- Emitted after resetting the Lua state.
+-- Emitted after resetting Textadept's Lua state.
-- Emitted by [`reset()`]().
-- Arguments:
--
-- * _`persist`_: Table of data persisted by `events.RESET_BEFORE`. All
-- handlers will have access to this same table.
-- @field RESET_BEFORE (string)
--- Emitted before resetting the Lua state.
+-- Emitted before resetting Textadept's Lua state.
-- Emitted by [`reset()`]().
-- Arguments:
--
diff --git a/docs/api.md b/docs/api.md
index f56dd0f5..47563602 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -2166,7 +2166,7 @@ Parameters:
#### `buffer.goto_line`(*buffer, line*)
Moves the caret to the beginning of line number *line* and scrolls it into
-view, regardless of whether or not *line* is hidden.
+view, event if *line* is hidden.
Parameters:
@@ -4100,7 +4100,7 @@ Emitted to replace all occurrences of found text.
<a id="events.RESET_AFTER"></a>
#### `events.RESET_AFTER` (string)
-Emitted after resetting the Lua state.
+Emitted after resetting Textadept's Lua state.
Emitted by [`reset()`](#reset).
Arguments:
@@ -4110,7 +4110,7 @@ Emitted after resetting the Lua state.
<a id="events.RESET_BEFORE"></a>
#### `events.RESET_BEFORE` (string)
-Emitted before resetting the Lua state.
+Emitted before resetting Textadept's Lua state.
Emitted by [`reset()`](#reset).
Arguments:
@@ -10018,7 +10018,7 @@ A call tip's highlighted text foreground color, in "0xBBGGRR" format.
<a id="view.call_tip_pos_start"></a>
#### `view.call_tip_pos_start` (number, Write-only)
-The position in which backspacing beyond it hides a visible call tip.
+The position at which backspacing beyond it hides a visible call tip.
<a id="view.call_tip_position"></a>
#### `view.call_tip_position` (boolean)
@@ -10592,7 +10592,8 @@ The modifier key used in combination with a mouse drag in order to create a
The alternative string representations of characters.
Representations are displayed in the same way control characters are. Use
the empty string for the '\0' character when assigning its representation.
- Characters are strings, not numeric codes.
+ Characters are strings, not numeric codes, and can be multi-byte
+ characters.
Call [`view.clear_representation()`](#view.clear_representation) to remove a representation.
<a id="view.rgba_image_height"></a>
@@ -10996,7 +10997,8 @@ Parameters:
<a id="view.clear_representation"></a>
#### `view.clear_representation`(*view, char*)
-Removes the alternate string representation for character *char*.
+Removes the alternate string representation for character *char* (which may
+ be a multi-byte character).
Parameters:
diff --git a/modules/lua/ta_api b/modules/lua/ta_api
index b40feb79..0c1a0918 100644
--- a/modules/lua/ta_api
+++ b/modules/lua/ta_api
@@ -221,8 +221,8 @@ QUIT events.QUIT (string)\nEmitted when quitting Textadept.\nWhen connecting to
REGEX lexer.REGEX (string)\nThe token name for regex tokens.
REPLACE events.REPLACE (string)\nEmitted to replace selected (found) text.\nArguments:\n\n* _`text`_: The replacement text.
REPLACE_ALL events.REPLACE_ALL (string)\nEmitted to replace all occurrences of found text.\nArguments:\n\n* _`find_text`_: The text to search for.\n* _`repl_text`_: The replacement text.
-RESET_AFTER events.RESET_AFTER (string)\nEmitted after resetting the Lua state.\nEmitted by `reset()`.\nArguments:\n\n* _`persist`_: Table of data persisted by `events.RESET_BEFORE`. All\n handlers will have access to this same table.
-RESET_BEFORE events.RESET_BEFORE (string)\nEmitted before resetting the Lua state.\nEmitted by `reset()`.\nArguments:\n\n* _`persist`_: Table to store persistent data in for use by\n `events.RESET_AFTER`. All handlers will have access to this same table.
+RESET_AFTER events.RESET_AFTER (string)\nEmitted after resetting Textadept's Lua state.\nEmitted by `reset()`.\nArguments:\n\n* _`persist`_: Table of data persisted by `events.RESET_BEFORE`. All\n handlers will have access to this same table.
+RESET_BEFORE events.RESET_BEFORE (string)\nEmitted before resetting Textadept's Lua state.\nEmitted by `reset()`.\nArguments:\n\n* _`persist`_: Table to store persistent data in for use by\n `events.RESET_AFTER`. All handlers will have access to this same table.
RESUME events.RESUME (string)\nEmitted when resuming Textadept from a suspended state.\nThis event is only emitted by the terminal version.
RUN_OUTPUT events.RUN_OUTPUT (string)\nEmitted when executing a language's run shell command.\nBy default, output is printed to the message buffer. In order to override\nthis behavior, connect to the event with an index of `1` and return `true`.\nArguments:\n\n* `output`: A line of string output from the command.\n* `ext_or_lexer`: The file extension or lexer name associated with the\n executed run command.
SAVE_POINT_LEFT events.SAVE_POINT_LEFT (string)\nEmitted after leaving a save point.
@@ -390,7 +390,7 @@ build_commands textadept.run.build_commands (table)\nMap of project root paths a
call_tip_active view.call_tip_active(view)\nReturns whether or not a call tip is visible.\n@param view A view.\n@return bool
call_tip_cancel view.call_tip_cancel(view)\nRemoves the displayed call tip from view.\n@param view A view.
call_tip_fore_hlt view.call_tip_fore_hlt (number, Write-only)\nA call tip's highlighted text foreground color, in "0xBBGGRR" format.
-call_tip_pos_start view.call_tip_pos_start (number, Write-only)\nThe position in which backspacing beyond it hides a visible call tip.
+call_tip_pos_start view.call_tip_pos_start (number, Write-only)\nThe position at which backspacing beyond it hides a visible call tip.
call_tip_pos_start view.call_tip_pos_start(view)\nReturns a call tip's display position.\n@param view A view.\n@return number
call_tip_position view.call_tip_position (boolean)\nDisplay a call tip above the current line instead of below it.\nThe default value is `false`.
call_tip_set_hlt view.call_tip_set_hlt(view, start_pos, end_pos)\nHighlights a call tip's text between positions *start_pos* to *end_pos* with\nthe color `view.call_tip_fore_hlt`.\n@param view A view.\n@param start_pos The start position in a call tip text to highlight.\n@param end_pos The end position in a call tip text to highlight.
@@ -424,7 +424,7 @@ clear textadept.history.clear()\nClears all view history.
clear_all buffer.clear_all(buffer)\nDeletes the buffer's text.\n@param buffer A buffer.
clear_document_style buffer.clear_document_style(buffer)\nClears all styling and folding information.\n@param buffer A buffer.
clear_registered_images view.clear_registered_images(view)\nClears all images registered using `view.register_image()` and\n`view.register_rgba_image()`.\n@param view A view.
-clear_representation view.clear_representation(view, char)\nRemoves the alternate string representation for character *char*.\n@param view A view.\n@param char The string character in `buffer.representations` to remove the\n alternate string representation for.
+clear_representation view.clear_representation(view, char)\nRemoves the alternate string representation for character *char* (which may\n be a multi-byte character).\n@param view A view.\n@param char The string character in `buffer.representations` to remove the\n alternate string representation for.
clipboard_text ui.clipboard_text (string)\nThe text on the clipboard.
close buffer.close(buffer, force)\nCloses the buffer, prompting the user to continue if there are unsaved\nchanges (unless *force* is `true`), and returns `true` if the buffer was\nclosed.\n@param buffer A buffer.\n@param force Optional flag that discards unsaved changes without prompting\n the user. The default value is `false`.\n@return `true` if the buffer was closed; `nil` otherwise.
close spawn_proc:close()\nCloses standard input for process *spawn_proc*, effectively sending an EOF\n(end of file) to it.
@@ -557,7 +557,7 @@ goto_buffer view.goto_buffer(view, buffer)\nSwitches to buffer *buffer* or the b
goto_error textadept.run.goto_error(line_num, next)\nJumps to the source of the recognized compile/run warning or error on line\nnumber *line_num* in the message buffer.\nIf *line_num* is `nil`, jumps to the next or previous warning or error,\ndepending on boolean *next*. Displays an annotation with the warning or error\nmessage if possible.\n@param line_num Optional line number in the message buffer that contains the\n compile/run warning or error to go to. This parameter may be omitted\n completely.\n@param next Optional flag indicating whether to go to the next recognized\n warning/error or the previous one. Only applicable when *line_num* is\n `nil`.\n@see error_patterns
goto_file ui.goto_file(filename, split, preferred_view, sloppy)\nSwitches to the existing view whose buffer's filename is *filename*.\nIf no view was found and *split* is `true`, splits the current view in order\nto show the requested file. If *split* is `false`, shifts to the next or\n*preferred_view* view in order to show the requested file. If *sloppy* is\n`true`, requires only the basename of *filename* to match a buffer's\n`filename`. If the requested file was not found, it is opened in the desired\nview.\n@param filename The filename of the buffer to go to.\n@param split Optional flag that indicates whether or not to open the buffer\n in a split view if there is only one view. The default value is `false`.\n@param preferred_view Optional view to open the desired buffer in if the\n buffer is not visible in any other view.\n@param sloppy Optional flag that indicates whether or not to not match\n *filename* to `buffer.filename` exactly. When `true`, matches *filename* to\n only the last part of `buffer.filename` This is useful for run and compile\n commands which output relative filenames and paths instead of full ones and\n it is likely that the file in question is already open. The default value\n is `false`.
goto_file_found ui.find.goto_file_found(line_num, next)\nJumps to the source of the find in files search result on line number\n*line_num* in the buffer titled "Files Found" or, if *line_num* is `nil`,\njumps to the next or previous search result, depending on boolean *next*.\n@param line_num Optional line number in the files found buffer that contains\n the search result to go to. This parameter may be omitted completely.\n@param next Optional flag indicating whether to go to the next search result\n or the previous one. Only applicable when *line_num* is `nil`.
-goto_line buffer.goto_line(buffer, line)\nMoves the caret to the beginning of line number *line* and scrolls it into\nview, regardless of whether or not *line* is hidden.\n@param buffer A buffer.\n@param line The line number in *buffer* to go to.
+goto_line buffer.goto_line(buffer, line)\nMoves the caret to the beginning of line number *line* and scrolls it into\nview, event if *line* is hidden.\n@param buffer A buffer.\n@param line The line number in *buffer* to go to.
goto_line textadept.editing.goto_line(line)\nMoves the caret to the beginning of line number *line* or the user-specified\nline, ensuring *line* is visible.\n@param line Optional line number to go to. If `nil`, the user is prompted for\n one.
goto_mark textadept.bookmarks.goto_mark(next)\nPrompts the user to select a bookmarked line to move the caret to the\nbeginning of unless *next* is given.\nIf *next* is `true` or `false`, moves the caret to the beginning of the next\nor previously bookmarked line, respectively.\n@param next Optional flag indicating whether to go to the next or previous\n bookmarked line relative to the current line. The default value is `nil`,\n prompting the user for a bookmarked line to go to.
goto_pos buffer.goto_pos(buffer, pos)\nMoves the caret to position *pos* and scrolls it into view.\n@param buffer A buffer.\n@param pos The position in *buffer* to go to.
@@ -798,7 +798,7 @@ replace_label_text ui.find.replace_label_text (string, Write-only)\nThe text of
replace_sel buffer.replace_sel(buffer, text)\nReplaces the selected text with string *text*, scrolling the caret into view.\n@param buffer A buffer.\n@param text The text to replace the selected text with.
replace_target buffer.replace_target(buffer, text)\nReplaces the text in the target range with string *text* sans modifying any\nselections or scrolling the view.\nSetting the target and calling this function with an empty string is another\nway to delete text.\n@param buffer A buffer.\n@param text The text to replace the target range with.\n@return number
replace_target_re buffer.replace_target_re(buffer, text)\nReplaces the text in the target range with string *text* but first replaces\nany "\d" sequences with the text of capture number *d* from the regular\nexpression (or the entire match for *d* = 0), and then returns the\nreplacement text's length.\n@param buffer A buffer.\n@param text The text to replace the target range with.\n@return number
-representation view.representation (table)\nThe alternative string representations of characters.\nRepresentations are displayed in the same way control characters are. Use\nthe empty string for the '\0' character when assigning its representation.\nCharacters are strings, not numeric codes.\nCall `view.clear_representation()` to remove a representation.
+representation view.representation (table)\nThe alternative string representations of characters.\nRepresentations are displayed in the same way control characters are. Use\nthe empty string for the '\0' character when assigning its representation.\nCharacters are strings, not numeric codes, and can be multi-byte\ncharacters.\nCall `view.clear_representation()` to remove a representation.
reset _G.reset()\nResets the Lua State by reloading all initialization scripts.\nLanguage modules for opened files are NOT reloaded. Re-opening the files that\nuse them will reload those modules instead.\nThis function is useful for modifying user scripts (such as\n*~/.textadept/init.lua* and *~/.textadept/modules/textadept/keys.lua*) on\nthe fly without having to restart Textadept. `arg` is set to `nil` when\nreinitializing the Lua State. Any scripts that need to differentiate between\nstartup and reset can test `arg`.
rgba_image_height view.rgba_image_height (number)\nThe height of the RGBA image to be defined using\n`view.marker_define_rgba_image()`.
rgba_image_scale view.rgba_image_scale (number)\nThe scale factor in percent of the RGBA image to be defined using\n`view.marker_define_rgba_image()`.\nThis is useful on macOS with a retina display where each display unit is 2\npixels: use a factor of `200` so that each image pixel is displayed using a\nscreen pixel. The default scale, `100`, will stretch each image pixel to\ncover 4 screen pixels on a retina display.
diff --git a/modules/textadept/command_entry.lua b/modules/textadept/command_entry.lua
index d7475a8c..2093001c 100644
--- a/modules/textadept/command_entry.lua
+++ b/modules/textadept/command_entry.lua
@@ -190,7 +190,7 @@ local function complete_lua()
M:auto_c_show(#part - 1, table.concat(cmpls, string.char(M.auto_c_separator)))
end
--- Key mode for entering Lua commands.
+-- Mode for entering Lua commands.
-- @class table
-- @name lua_keys
local lua_keys = {['\t'] = complete_lua}