diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/lua/api | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/lua/api b/modules/lua/api index 531b8e66..e893b4a2 100644 --- a/modules/lua/api +++ b/modules/lua/api @@ -756,7 +756,7 @@ lines_join buffer.lines_join(buffer)\nJoins the lines in the target range, inser lines_on_screen buffer.lines_on_screen (number, Read-only)\nThe number of completely visible lines in the view.\nIt is possible to have a partial line visible at the bottom of the view. lines_split buffer.lines_split(buffer, pixel_width, width)\nSplits the lines in the target range into lines *width* pixels wide.\nIf *width* is `0`, splits the lines in the target range into lines as wide as\nthe view.\n@param buffer A buffer.\n@param width The pixel width to split lines at. When `0`, uses the width of\n the view. load _G.load(chunk [, chunkname [, mode [, env]]])\nLoads a chunk.\n\nIf `chunk` is a string, the chunk is this string. If `chunk` is a function, `load`\ncalls it repeatedly to get the chunk pieces. Each call to `chunk` must return a\nstring that concatenates with previous results. A return of an empty string,\nnil, or no value signals the end of the chunk.\n\nIf there are no syntactic errors, returns the compiled chunk as a function;\notherwise, returns nil plus the error message.\n\nIf the resulting function has upvalues, the first upvalue is set to the value\nof `env`, if that parameter is given, or to the value of the global\nenvironment. Other upvalues are initialized with nil. (When you load a main\nchunk, the resulting function will always have exactly one upvalue, the\n`_ENV` variable (see §2.2). However, when you load a binary chunk created\nfrom a function (see `string.dump`), the resulting function can have an\narbitrary number of upvalues.) All upvalues are fresh, that is, they are not\nshared with any other function.\n\n`chunkname` is used as the name of the chunk for error messages and debug\ninformation (see §4.9). When absent, it defaults to `chunk`, if `chunk` is a\nstring, or to "`=(load)`" otherwise.\n\nThe string `mode` controls whether the chunk can be text or binary (that is,\na precompiled chunk). It may be the string "`b`" (only binary chunks), "`t`"\n(only text chunks), or "`bt`" (both binary and text). The default is "`bt`".\n\nLua does not check the consistency of binary chunks. Maliciously crafted\nbinary chunks can crash the interpreter. -load lexer.load(name, alt_name)\nInitializes or loads and returns the lexer of string name *name*.\nScintilla calls this function in order to load a lexer. Parent lexers also\ncall this function in order to load child lexers and vice-versa. The user\ncalls this function in order to load a lexer when using Scintillua as a Lua\nlibrary.\n@param name The name of the lexing language.\n@param alt_name The alternate name of the lexing language. This is useful for\n embedding the same child lexer with multiple sets of start and end tokens.\n@return lexer object +load lexer.load(name, alt_name, cache)\nInitializes or loads and returns the lexer of string name *name*.\nScintilla calls this function in order to load a lexer. Parent lexers also\ncall this function in order to load child lexers and vice-versa. The user\ncalls this function in order to load a lexer when using Scintillua as a Lua\nlibrary.\n@param name The name of the lexing language.\n@param alt_name The alternate name of the lexing language. This is useful for\n embedding the same child lexer with multiple sets of start and end tokens.\n@param cache Flag indicating whether or not to load lexers from the cache.\n This should only be `true` when initially loading a lexer (e.g. not from\n within another lexer for embedding purposes).\n The default value is `false`.\n@return lexer object load textadept.session.load(filename)\nLoads session file *filename* or the user-selected session, returning `true`\nif a session file was opened and read.\nTextadept restores split views, opened buffers, cursor information, recent\nfiles, and bookmarks.\n@param filename Optional absolute path to the session file to load. If `nil`,\n the user is prompted for one.\n@usage textadept.session.load(filename)\n@return `true` if the session file was opened and read; `false` otherwise.\n@see default_session loaded package.loaded (table)\nA table used by `require` to control which modules are already loaded. When\nyou require a module `modname` and `package.loaded[modname]` is not false,\n`require` simply returns the value stored there.\nThis variable is only a reference to the real table; assignments to this\nvariable do not change the table used by `require`. loaders package.loaders (table)\nSee `package.searchers`.\n\nDeprecated in Lua 5.2. @@ -1061,7 +1061,7 @@ snippets _G.snippets (table)\nMap of snippet triggers with their snippet text or 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, after the sort, `i < j` implies\n`not comp(list[j],list[i])` will be true after the sort). If `comp` is not\ngiven, then the standard Lua operator `<` is used instead.\n\nNote that the `comp` function must not define a string partial order over the\nelements in the list; that is, it must be asymmetric and transitive.\nOtherwise, no valid sort may be possible.\n\nThe sort algorithm is not stable; that is, elements not comparable by the\ngiven order (e.g., equal elements) may have their relative positions changed\nby the sort. space lexer.space (pattern)\nA pattern that matches any whitespace character ('\t', '\v', '\f', '\n',\n'\r', space). -spawn _G.spawn(argv, cwd, env, 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, only the Win32 terminal version spawns processes in the same\nthread.\n@param argv A command line string that contains the program's name followed\n by arguments to pass to it. `PATH` is searched for program names.\n@param cwd Optional current working directory (cwd) for the child\n process. The default value is `nil`, which inherits the parent's cwd.\n@param env Optional list of environment variables for the child process.\n Each element in the list is a 'KEY=VALUE' string. The default value is\n `nil`, which inherits the parent's environment.\n This parameter should be omitted completely instead of specifying `nil`.\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, only the Win32 terminal version sends all output, whether it\n be stdout or stderr, to 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 or nil plus an error message on failure +spawn _G.spawn(argv, cwd, env, stdout_cb, stderr_cb, exit_cb)\nSpawns an interactive child process *argv* in a separate thread, returning\na handle to that process.\nOn Windows, *argv* is passed to `cmd.exe`: `%COMSPEC% /c [argv]`.\nAt the moment, only the Windows terminal version spawns processes in the same\nthread.\n@param argv A command line string that contains the program's name followed\n by arguments to pass to it. `PATH` is searched for program names.\n@param cwd Optional current working directory (cwd) for the child\n process. The default value is `nil`, which inherits the parent's cwd.\n@param env Optional list of environment variables for the child process.\n Each element in the list is a 'KEY=VALUE' string. The default value is\n `nil`, which inherits the parent's environment.\n This parameter should be omitted completely instead of specifying `nil`.\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, only the Win32 terminal version sends all output, whether it\n be stdout or stderr, to 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 or nil plus an error message on failure 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.\nIf *options*.`string_output` is `true`, returns the selected button's label\nalong with 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 its text. If the dialog timed out,\nreturns `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 (instead of its\n index) and the selected item's text (instead of its index). If no item\n was selected, returns the dialog's exit status (instead of its exit\n code). The 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, selected item |