aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2014-09-17 12:53:40 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2014-09-17 12:53:40 -0400
commitc44b084d2c15bf73a610c371998a8c791d298a0f (patch)
treeb74c4b573f0e5086a45fe7c06bf4b4bf90f7b5b9 /core
parentc19cb9243d4e2ee4dfdb425d323922aacb8c603e (diff)
downloadtextadept-c44b084d2c15bf73a610c371998a8c791d298a0f.tar.gz
textadept-c44b084d2c15bf73a610c371998a8c791d298a0f.zip
More LuaDoc updates.
Diffstat (limited to 'core')
-rw-r--r--core/.buffer.luadoc16
-rw-r--r--core/.ui.dialogs.luadoc45
-rw-r--r--core/init.lua6
3 files changed, 35 insertions, 32 deletions
diff --git a/core/.buffer.luadoc b/core/.buffer.luadoc
index 2fd1a409..29b15341 100644
--- a/core/.buffer.luadoc
+++ b/core/.buffer.luadoc
@@ -151,9 +151,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 to display a call tip at with [`buffer.call_tip_show()`]().
--- When a call tip is visible, this is the position where backspacing beyond
--- it hides the call tip.
+-- The position in 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`.
@@ -539,8 +537,8 @@
-- `DWELL_START` event. A time of `buffer.TIME_FOREVER` will never generate
-- one.
-- @field mouse_selection_rectangular_switch (bool)
--- Whether or not pressing [`buffer.rectangular_selection_modifier`]() during
--- normal text selection with the mouse turns on rectangular selection.
+-- Whether or not pressing [`buffer.rectangular_selection_modifier`]() when
+-- selecting text normally with the mouse turns on rectangular selection.
-- The default value is `false`.
-- @field modify (bool)
-- Whether or not the buffer has unsaved changes.
@@ -885,11 +883,11 @@
-- * `buffer.WRAP_NONE`
-- Long lines are not wrapped.
-- * `buffer.WRAP_WORD`
--- Wrap long lines at word and style boundaries.
+-- Wrap long lines at word (and style) boundaries.
-- * `buffer.WRAP_CHAR`
-- Wrap long lines at character boundaries.
-- * `buffer.WRAP_WHITESPACE`
--- Wrap long lines at word boundaries, ignoring style boundaries.
+-- Wrap long lines at word boundaries (ignoring style boundaries).
--
-- The default value is `buffer.WRAP_NONE`.
-- @field wrap_start_indent (number)
@@ -2406,8 +2404,8 @@ function position_before(buffer, pos) end
function position_from_line(buffer, line) end
---
--- Returns the position *n* characters before or after position *pos*, taking
--- multi-byte characters into account.
+-- Returns the position *n* characters before or after position *pos* (taking
+-- multi-byte characters into account).
-- Returns `0` if the position is less than 0 or `buffer.length` if the position
-- is greater than `buffer.length`.
-- @param buffer A buffer.
diff --git a/core/.ui.dialogs.luadoc b/core/.ui.dialogs.luadoc
index 958ff55e..523c423b 100644
--- a/core/.ui.dialogs.luadoc
+++ b/core/.ui.dialogs.luadoc
@@ -104,14 +104,15 @@ function ok_msgbox(options) end
function yesno_msgbox(options) end
---
--- Prompts the user with a one-line input-box dialog defined by dialog options
--- table *options*, returning the selected button's index along with the user's
--- input text.
+-- Prompts the user with an inputbox dialog defined by dialog options table
+-- *options*, returning the selected button's index along with the user's
+-- input text (the latter as a string or table, depending on the type of
+-- *options*.`informative_text`).
-- If *options*.`string_output` is `true`, returns the selected button's label
-- along with the user's input text.
-- If the dialog timed out, returns `0` or `"timeout"`. If the user canceled the
-- dialog, returns `-1` or `"delete"`.
--- @param options Table of key-value option pairs for the input-box.
+-- @param options Table of key-value option pairs for the inputbox.
--
-- * `title`: The dialog's title text.
-- * `informative_text`: The dialog's main message text. If the value is a
@@ -141,14 +142,15 @@ function yesno_msgbox(options) end
function inputbox(options) end
---
--- Prompts the user with a one-line input-box dialog defined by dialog options
--- table *options* and with localized "Ok" and "Cancel" buttons, returning the
--- selected button's index along with the user's input text.
+-- Prompts the user with an inputbox dialog defined by dialog options table
+-- *options* and with localized "Ok" and "Cancel" buttons, returning the
+-- selected button's index along with the user's input text (the latter as a
+-- string or table, depending on the type of *options*.`informative_text`).
-- If *options*.`string_output` is `true`, returns the selected button's label
-- along with the user's input text.
-- If the dialog timed out, returns `0` or `"timeout"`. If the user canceled the
-- dialog, returns `-1` or `"delete"`.
--- @param options Table of key-value option pairs for the input-box.
+-- @param options Table of key-value option pairs for the inputbox.
--
-- * `title`: The dialog's title text.
-- * `informative_text`: The dialog's main message text. If the value is a
@@ -173,14 +175,15 @@ function inputbox(options) end
function standard_inputbox(options) end
---
--- Prompts the user with a one-line masked input-box dialog defined by dialog
--- options table *options*, returning the selected button's index along with the
--- user's input text.
+-- Prompts the user with a masked inputbox dialog defined by dialog options
+-- table *options*, returning the selected button's index along with the user's
+-- input text (the latter as a string or table, depending on the type of
+-- *options*.`informative_text`).
-- If *options*.`string_output` is `true`, returns the selected button's label
-- along with the user's input text.
-- If the dialog timed out, returns `0` or `"timeout"`. If the user canceled the
-- dialog, returns `-1` or `"delete"`.
--- @param options Table of key-value option pairs for the input-box.
+-- @param options Table of key-value option pairs for the inputbox.
--
-- * `title`: The dialog's title text.
-- * `informative_text`: The dialog's main message text. If the value is a
@@ -208,14 +211,15 @@ function standard_inputbox(options) end
function secure_inputbox(options) end
---
--- Prompts the user with a one-line masked input-box dialog defined by dialog
--- options table *options* and with localized "Ok" and "Cancel" buttons,
--- returning the selected button's index along with the user's input text.
+-- Prompts the user with a masked inputbox dialog defined by dialog options
+-- table *options* and with localized "Ok" and "Cancel" buttons, returning the
+-- selected button's index along with the user's input text (the latter as a
+-- string or table, depending on the type of *options*.`informative_text`).
-- If *options*.`string_output` is `true`, returns the selected button's label
-- along with the user's input text.
-- If the dialog timed out, returns `0` or `"timeout"`. If the user canceled the
-- dialog, returns `-1` or `"delete"`.
--- @param options Table of key-value option pairs for the input-box.
+-- @param options Table of key-value option pairs for the inputbox.
--
-- * `title`: The dialog's title text.
-- * `informative_text`: The dialog's main message text. If the value is a
@@ -440,8 +444,9 @@ function filteredlist(options) end
---
-- Prompts the user with an option selection dialog defined by dialog options
-- table *options*, returning the selected button's index along with the indices
--- of the selected options or, if *options*.`string_output` is `true`, the
--- selected button's label along with the text of the selected options.
+-- of the selected options.
+-- If *options*.`string_output` is `true`, returns the selected button's label
+-- along with the text of the selected options.
-- If the dialog timed out, returns `0` or `"timeout"`. If the user canceled the
-- dialog, returns `-1` or `"delete"`.
-- @param options Table of key-value option pairs for the option select dialog.
@@ -456,8 +461,8 @@ function filteredlist(options) end
-- to be set.
-- * `select`: The indices of initially selected options.
-- * `string_output`: Return the selected button's label or the dialog's exit
--- status along with the selected option's text instead of the button's
--- index or the dialog's exit code along with the option's index. The
+-- status along with the selected options' text instead of the button's
+-- index or the dialog's exit code along with the options' indices. The
-- default value is `false`.
-- * `width`: The dialog's pixel width.
-- * `height`: The dialog's pixel height.
diff --git a/core/init.lua b/core/init.lua
index 50289ce0..223aee4b 100644
--- a/core/init.lua
+++ b/core/init.lua
@@ -18,9 +18,9 @@ _M = {} -- language modules table
if jit then module, package.searchers, bit32 = nil, package.loaders, bit end
-- pdcurses compatibility.
if CURSES and WIN32 then
- function spawn(argv, working_dir, stdout_cb, stderr_cb, exit_cb)
+ function spawn(argv, cwd, stdout_cb, stderr_cb, exit_cb)
local current_dir = lfs.currentdir()
- if working_dir then lfs.chdir(working_dir) end
+ if cwd then lfs.chdir(cwd) end
local p = io.popen(argv..' 2>&1')
if stdout_cb then stdout_cb(p:read('*a')) end
if exit_cb then exit_cb(select(3, p:close())) else p:close() end
@@ -144,7 +144,7 @@ local timeout
-- thread.
-- @param argv A command line string containing the program's name followed by
-- arguments to pass to it. `PATH` is searched for program names.
--- @param working_dir Optional current working directory (cwd) for the child
+-- @param cwd Optional current working directory (cwd) for the child
-- process. The default value is `nil`, which inherits the parent's cwd.
-- @param stdout_cb Optional Lua function that accepts a string parameter for a
-- block of standard output read from the child. Stdout is read asynchronously