diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/lua/api | 9 | ||||
-rw-r--r-- | modules/lua/tags | 1 |
2 files changed, 6 insertions, 4 deletions
diff --git a/modules/lua/api b/modules/lua/api index 396e15d9..3c67ed69 100644 --- a/modules/lua/api +++ b/modules/lua/api @@ -530,7 +530,7 @@ dialogs ui.dialogs (module)\nProvides a set of interactive dialog prompts for us difftime os.difftime(t2, t1)\nReturns the number of seconds from time `t1` to time `t2`. In POSIX,\nWindows, and some other systems, this value is exactly `t2`*-*`t1`. digit lexer.digit (pattern)\nA pattern that matches any digit ('0'-'9'). dir lfs.dir(path)\nLua iterator over the entries of a given directory. Each time the iterator is\ncalled with dir_obj it returns a directory entry's name as a string, or nil\nif there are no more entries. You can also iterate by calling dir_obj:next(),\nand explicitly close the directory before the iteration finished with\ndir_obj:close(). Raises an error if path is not a directory. -dir_foreach lfs.dir_foreach(dir, f, filter, exclude_FILTER, recursing)\nIterates over all files and sub-directories in directory *dir*, calling\nfunction *f* with each file found.\nFiles passed to *f* do not match any pattern in string or table *filter*,\nand, unless *exclude_FILTER* is `true`, `lfs.FILTER` as well. A filter table\ncontains Lua patterns that match filenames to exclude, an optional `folders`\nsub-table that contains patterns matching directories to exclude, and an\noptional `extensions` sub-table that contains raw file extensions to exclude.\nAny patterns starting with '!' exclude files and directories that do not\nmatch the pattern that follows.\n@param dir The directory path to iterate over.\n@param f Function to call with each full file path found. If *f* returns\n `false` explicitly, iteration ceases.\n@param filter Optional filter for files and directories to exclude.\n@param exclude_FILTER Optional flag indicating whether or not to exclude the\n default filter `lfs.FILTER` in the search. If `false`, adds `lfs.FILTER` to\n *filter*.\n The default value is `false` to include the default filter.\n@param recursing Utility flag indicating whether or not this function has\n been recursively called. This flag is used and set internally, and should\n not be set otherwise.\n@see FILTER +dir_foreach lfs.dir_foreach(dir, f, filter, exclude_FILTER, n, include_dirs, level)\nIterates over all files and sub-directories (up to level number *n*) in\ndirectory *dir*, calling function *f* with each file found.\nFiles passed to *f* do not match any pattern in string or table *filter*,\nand, unless *exclude_FILTER* is `true`, `lfs.FILTER` as well. A filter table\ncontains Lua patterns that match filenames to exclude, an optional `folders`\nsub-table that contains patterns matching directories to exclude, and an\noptional `extensions` sub-table that contains raw file extensions to exclude.\nAny patterns starting with '!' exclude files and directories that do not\nmatch the pattern that follows.\n@param dir The directory path to iterate over.\n@param f Function to call with each full file path found. If *f* returns\n `false` explicitly, iteration ceases.\n@param filter Optional filter for files and directories to exclude.\n@param exclude_FILTER Optional flag indicating whether or not to exclude the\n default filter `lfs.FILTER` in the search. If `false`, adds `lfs.FILTER` to\n *filter*.\n The default value is `false` to include the default filter.\n@param n Optional maximum number of directory levels to descend into.\n The default value is `nil`, which indicates no limit.\n@param include_dirs Optional flag indicating whether or not to call *f* with\n directory names too. Directory names are passed with a trailing '/' or '\',\n depending on the current platform.\n The default value is `false`.\n@param level Utility value indicating the directory level this function is\n at. This value is used and set internally, and should not be set otherwise.\n@see FILTER disconnect events.disconnect(event, f)\nRemoves function *f* from the set of handlers for event *event*.\n@param event The string event name.\n@param f The Lua function connected to *event*.\n@see connect doc_line_from_visible buffer.doc_line_from_visible(buffer, display_line)\nReturns the actual line number of displayed line number *display_line*,\ntaking hidden lines into account.\nIf *display_line* is less than or equal to zero, returns `0`. If\n*display_line* is greater than or equal to the number of displayed lines,\nreturns `buffer.line_count`.\n@param buffer A buffer.\n@param display_line The display line number to use.\n@return number document_end buffer.document_end(buffer)\nMoves the caret to the end of the buffer.\n@param buffer A buffer. @@ -856,6 +856,7 @@ paste buffer.paste(buffer)\nPastes the clipboard's contents into the buffer, rep path package.path (string)\nThe path used by `require` to search for a Lua loader.\nAt start-up, Lua initializes this variable with the value of the\nenvironment variable `LUA_PATH_5_2` or the environment variable `LUA_PATH`\nor with a default path defined in `luaconf.h`, if those environment\nvariables are not defined. Any "`;;`" in the value of the environment\nvariable is replaced by the default path. patterns textadept.file_types.patterns (table)\nMap of first-line patterns to their associated lexer names.\nIf a file type is not recognized by shebang words, each pattern is matched\nagainst the first line in the file. pcall _G.pcall(f [, arg1, ···])\nCalls function `f` with the given arguments in *protected mode*. This\nmeans that any error inside `f` is not propagated; instead, `pcall` catches\nthe error and returns a status code. Its first result is the status code (a\nboolean), which is true if the call succeeds without errors. In such case,\n`pcall` also returns all results from the call, after this first result. In\ncase of any error, `pcall` returns false plus the error message. +phases_draw buffer.phases_draw (number)\nThe number of phases drawing is performed in.\n\n* `buffer.PHASES_ONE`\n For each line, draw the background and text at the same time. (No\n character overlapping.)\n* `buffer.PHASES_TWO`\n For each line, draw the background first and then text on top of it. (No\n line overlapping.)\n* `buffer.PHASES_MULTIPLE`\n Similar to `buffer.PHASES_TWO`, but allows lines to overlap.\n Incompatible with `buffer.buffered_draw = true`.\n\nThe default value is `buffer.PHASES_TWO`. pi math.pi (number)\nThe value of 'π'. popen io.popen(prog [, mode])\nStarts program `prog` in a separated process and returns a file handle\nthat you can use to read data from this program (if `mode` is `"r"`,\nthe default) or to write data to this program (if `mode` is `"w"`).\n\nThis function is system dependent and is not available on all platforms. position_after buffer.position_after(buffer, pos)\nReturns the position of the character after position *pos* (taking multi-byte\ncharacters into account), or `buffer.length` if there is no character after\n*pos*.\n@param buffer A buffer.\n@param pos The position in *buffer* to get the position after from. @@ -1030,13 +1031,13 @@ snippets _G.snippets (table)\nMap of snippet triggers with their snippet text, w snippets textadept.snippets (module)\nSnippets for Textadept. sort table.sort(list [, comp])\nSorts list elements in a given order, *in-place*, from `list[1]` to\n`list[#list]`. If `comp` is given, then it must be a function that receives\ntwo list elements and returns true when the first element must come before\nthe second in the final order (so that `not comp(list[i+1],list[i])` will be\ntrue after the sort). If `comp` is not given, then the standard Lua operator\n`<` is used instead.\n\nThe sort algorithm is not stable; that is, elements considered equal by the\ngiven order may have their relative positions changed by the sort. space lexer.space (pattern)\nA pattern that matches any whitespace character ('\t', '\v', '\f', '\n',\n'\r', space). -spawn _G.spawn(argv, working_dir, stdout_cb, stderr_cb, exit_cb)\nSpawns an interactive child process *argv* in a separate thread, returning\na handle to that process.\nThe terminal version spawns processes in the same thread.\n@param argv A command line string containing the program's name followed by\n arguments to pass to it. `PATH` is searched for program names.\n@param working_dir Optional current working directory (cwd) for the child\n process. The default value is `nil`, which inherits the parent's cwd.\n@param stdout_cb Optional Lua function that accepts a string parameter for a\n block of standard output read from the child. Stdout is read asynchronously\n in 1KB or 0.5KB blocks (depending on the platform), or however much data is\n available at the time.\n The terminal version sends all output, whether it be stdout or stderr, to\n this callback after the process finishes.\n@param stderr_cb Optional Lua function that accepts a string parameter for a\n block of standard error read from the child. Stderr is read asynchronously\n in 1KB or 0.5kB blocks (depending on the platform), or however much data is\n available at the time.\n@param exit_cb Optional Lua function that is called when the child process\n finishes. The child's exit status is passed.\n@usage spawn('lua buffer.filename', nil, print)\n@usage proc = spawn('lua -e "print(io.read())", nil, print)\n proc:write('foo\\n')\n@return proc +spawn _G.spawn(argv, working_dir, stdout_cb, stderr_cb, exit_cb)\nSpawns an interactive child process *argv* in a separate thread, returning\na handle to that process.\nAt the moment, the Mac OSX GUI version and Win32 terminal version spawn\nprocesses in the same thread.\n@param argv A command line string containing the program's name followed by\n arguments to pass to it. `PATH` is searched for program names.\n@param working_dir Optional current working directory (cwd) for the child\n process. The default value is `nil`, which inherits the parent's cwd.\n@param stdout_cb Optional Lua function that accepts a string parameter for a\n block of standard output read from the child. Stdout is read asynchronously\n in 1KB or 0.5KB blocks (depending on the platform), or however much data is\n available at the time.\n At the moment, the Mac OSX GUI version and Win32 terminal version send all\n output, whether it be stdout or stderr, to this callback after the process\n finishes.\n@param stderr_cb Optional Lua function that accepts a string parameter for a\n block of standard error read from the child. Stderr is read asynchronously\n in 1KB or 0.5kB blocks (depending on the platform), or however much data is\n available at the time.\n@param exit_cb Optional Lua function that is called when the child process\n finishes. The child's exit status is passed.\n@usage spawn('lua buffer.filename', nil, print)\n@usage proc = spawn('lua -e "print(io.read())"', nil, print)\n proc:write('foo\n')\n@return proc split view.split(view, vertical)\nSplits the view into top and bottom views (unless *vertical* is `true`),\nfocuses the new view, and returns both the old and new views.\nIf *vertical* is `false`, splits the view vertically into left and\nright views.\nEmits a `VIEW_NEW` event.\n@param view The view to split.\n@param vertical Optional flag indicating whether or not to split the view\n vertically. The default value is `false`, for horizontal.\n@return old view and new view.\n@see events.VIEW_NEW sqrt math.sqrt(x)\nReturns the square root of `x`. (You can also use the expression `x^0.5`\nto compute this value.) standard_dropdown ui.dialogs.standard_dropdown(options)\nPrompts the user with a drop down item selection dialog defined by dialog\noptions table *options* and with localized "Ok" and "Cancel" buttons,\nreturning the selected button's index along with the selected item's index\nor, if *options*.`string_output` is `true`, the selected button's label along\nwith the selected item's text.\nIf the dialog closed due to *options*.`exit_onchange`, returns `4` along with\neither the selected item's index or text. If the dialog timed out, returns\n`0` or `"timeout"`. If the user canceled the dialog, returns `-1` or\n`"delete"`.\n@param options Table of key-value option pairs for the drop down dialog.\n\n * `title`: The dialog's title text.\n * `text`: The dialog's main message text.\n * `items`: The list of string items to show in the drop down.\n * `no_cancel`: Do not display the "Cancel" button. The default value is\n `false`.\n * `exit_onchange`: Close the dialog after selecting a new item. The default\n value is `false`.\n * `select`: The index of the initially selected list item. The default\n value is `1`.\n * `string_output`: Return the selected button's label or the dialog's exit\n status along with the selected item's text instead of the button's index\n or the dialog's exit code along with the item's index. The default value\n is `false`.\n * `width`: The dialog's pixel width.\n * `height`: The dialog's pixel height.\n * `float`: Show the dialog on top of all desktop windows. The default value\n is `false`.\n * `timeout`: the integer number of seconds the dialog waits for the user to\n select a button before timing out. Dialogs do not time out by default.\n@return selected button or exit code, selected item standard_inputbox ui.dialogs.standard_inputbox(options)\nPrompts the user with a one-line input box dialog defined by dialog options\ntable *options* and with localized "Ok" and "Cancel" buttons, returning the\nselected button's index along with the input text or, if\n*options*.`string_output` is `true`, the selected button's label along with\nthe input text.\nIf the dialog timed out, returns `0` or `"timeout"`. If the user canceled the\ndialog, returns `-1` or `"delete"`.\n@param options Table of key-value option pairs for the input box.\n\n * `title`: The dialog's title text.\n * `informative_text`: The dialog's main message text. If the value is a\n table, the first table value is the main message text and any subsequent\n values are used as the labels for multiple entry boxes. Providing a\n single label has no effect.\n * `text`: The dialog's initial input text. If the value is a table, the\n table values are used to populate the multiple entry boxes defined by\n `informative_text`.\n * `no_cancel`: Do not display the "Cancel" button. The default value is\n `false`.\n * `string_output`: Return the selected button's label or the dialog's exit\n status instead of the button's index or the dialog's exit code. The\n default value is `false`.\n * `width`: The dialog's pixel width.\n * `height`: The dialog's pixel height.\n * `float`: Show the dialog on top of all desktop windows. The default value\n is `false`.\n * `timeout`: the integer number of seconds the dialog waits for the user to\n select a button before timing out. Dialogs do not time out by default.\n@return selected button or exit code, input text -start_styling buffer.start_styling(buffer, position, style_mask, styling_mask)\nBegins styling at position *position* with styling bit-mask *styling_mask*.\n*styling_mask* specifies which style bits can be set with\n`buffer.set_styling()`.\n@param buffer A buffer.\n@param position The position in *buffer* to start styling at.\n@param styling_mask The bit mask of style bits that can be set when styling.\n@usage buffer:start_styling(0, 0xFF) -starts_line lexer.starts_line(patt)\nCreates and returns a pattern that matches pattern *patt* only at the\nbeginning of a line.\n@param patt The LPeg pattern to match on the beginning of a line.\n@usage local preproc = token(l.PREPROCESSOR, #P('#') * l.starts_line('#' *\n l.nonnewline^0))\n@return pattern +start_styling buffer.start_styling(buffer, position, style_mask)\nBegins styling at position *position* with styling bit-mask *style_mask*.\n*style_mask* specifies which style bits can be set with\n`buffer.set_styling()`.\n@param buffer A buffer.\n@param position The position in *buffer* to start styling at.\n@param style_mask The bit mask of style bits that can be set when styling.\n@usage buffer:start_styling(0, 0xFF)\n@see set_styling +starts_line lexer.starts_line(patt)\nCreates and returns a pattern that matches pattern *patt* only at the\nbeginning of a line.\n@param patt The LPeg pattern to match on the beginning of a line.\n@usage local preproc = token(l.PREPROCESSOR, l.starts_line('#') *\n l.nonnewline^0)\n@return pattern status coroutine.status(co)\nReturns the status of coroutine `co`, as a string: `"running"`, if\nthe coroutine is running (that is, it called `status`); `"suspended"`, if\nthe coroutine is suspended in a call to `yield`, or if it has not started\nrunning yet; `"normal"` if the coroutine is active but not running (that\nis, it has resumed another coroutine); and `"dead"` if the coroutine has\nfinished its body function, or if it has stopped with an error. status spawn_proc:status()\nReturns the status of process *proc*, which is either "running" or\n"terminated".\n@return "running" or "terminated" statusbar_text ui.statusbar_text (string, Write-only)\nThe text displayed in the statusbar. diff --git a/modules/lua/tags b/modules/lua/tags index 17a2496a..8c1d88b4 100644 --- a/modules/lua/tags +++ b/modules/lua/tags @@ -864,6 +864,7 @@ paste _ 0;" f class:buffer path _ 0;" F class:package patterns _ 0;" t class:textadept.file_types pcall _ 0;" f +phases_draw _ 0;" F class:buffer pi _ 0;" F class:math popen _ 0;" f class:io position_after _ 0;" f class:buffer |