diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/lua/api | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/lua/api b/modules/lua/api index 94fe310c..875ccba6 100644 --- a/modules/lua/api +++ b/modules/lua/api @@ -423,7 +423,7 @@ brace_highlight_indicator buffer.brace_highlight_indicator(buffer, use_indicator brace_match buffer.brace_match(buffer, pos)\nReturns the position of the matching brace for the brace character at\nposition *pos*, taking nested braces into account, or `-1`.\nThe brace characters recognized are '(', ')', '[', ']', '{', '}', '<', and\n'>' and must have the same style.\n@param buffer A buffer.\n@param pos The position of the brace in *buffer* to match.\n@return number brace_matches textadept.editing.brace_matches (table)\nTable of brace characters to highlight.\nThe ASCII values of brace characters are keys and are assigned non-`nil`\nvalues. The default brace characters are '(', ')', '[', ']', '{', and '}'. btest bit32.btest(...)\nReturns a boolean signaling whether the bitwise "and" of its operands is\ndifferent from zero.\n\nNew in Lua 5.2.\nDeprecated in Lua 5.3. -buffer _G.buffer (module)\nA Textadept buffer object.\nConstants are documented in the fields they apply to.\nWhile you can work with individual buffer instances, it is really only useful\nto work with the global one. +buffer _G.buffer (module)\nA Textadept buffer object.\nConstants are documented in the fields they apply to.\nWhile you can work with individual buffer instances, it is really only useful\nto work with the global one.\nMany of these functions and fields are derived from the Scintilla editing\ncomponent, and additional information can be found on the Scintilla website:\nhttp://scintilla.org/ScintillaDoc.html buffer _G.buffer (table)\nThe current buffer in the current view. buffer view.buffer (table)\nThe buffer the view contains. (Read-only) bufstatusbar_text ui.bufstatusbar_text (string, Write-only)\nThe text displayed in the buffer statusbar. @@ -445,7 +445,7 @@ cancel buffer.cancel(buffer)\nCancels the active selection mode, autocompletion caret_fore buffer.caret_fore (number)\nThe caret's foreground color, in "0xBBGGRR" format. caret_line_back buffer.caret_line_back (number)\nThe background color, in "0xBBGGRR" format, of the line that contains the\ncaret. caret_line_back_alpha buffer.caret_line_back_alpha (number)\nThe caret line's background alpha value, ranging from `0` (transparent) to\n`255` (opaque).\nThe default value is `buffer.ALPHA_NOALPHA`, for no alpha. -caret_line_frame buffer.caret_line_frame (number)\nThe caret line's frame width in pixels.\nWhen non-zero, the line that contains the caret is framed instead of \ncolored in. The `buffer.caret_line_back` and `buffer.caret_line_back_alpha`\nproperties apply to the frame.\nThe default value is `0`. +caret_line_frame buffer.caret_line_frame (number)\nThe caret line's frame width in pixels.\nWhen non-zero, the line that contains the caret is framed instead of\ncolored in. The `buffer.caret_line_back` and `buffer.caret_line_back_alpha`\nproperties apply to the frame.\nThe default value is `0`. caret_line_visible buffer.caret_line_visible (bool)\nColor the background of the line that contains the caret a different color.\nThe default value is `false`. caret_line_visible_always buffer.caret_line_visible_always (bool)\nAlways show the caret line, even when the window is not in focus.\nThe default value is `false`, showing the line only when the window is in\nfocus. caret_period buffer.caret_period (number)\nThe time between caret blinks in milliseconds.\nA value of `0` stops blinking.\nThe default value is `500`. @@ -862,7 +862,7 @@ oct_num lexer.oct_num (pattern)\nA pattern that matches an octal number. offset utf8.offset(s, n [, i])\nReturns the position (in bytes) where the encoding of the `n`-th character of\n`s` (counting from position `i`) starts. A negative `n` gets characters\nbefore position `i`. The default for `i` is 1 when `n` is non-negative and\n`#s + 1` otherwise, so that `utf8.offset(s, -n)` gets the offset of the\n`n`-th character from the end of the string. If the specified character is\nneither in the subject nor right after its end, the function returns nil.\n\nAs a special case, when `n` is 0 the function returns the start of the\nencoding of the character that contains the `i`-th byte of `s`.\n\nThis function assumes that `s` is a valid UTF-8 string.\n\nNew in Lua 5.3. ok_msgbox ui.dialogs.ok_msgbox(options)\nPrompts the user with a generic message box dialog defined by dialog options\ntable *options* and with localized "Ok" and "Cancel" buttons, returning the\nselected button's index.\nIf *options*.`string_output` is `true`, returns the selected button's label.\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 message box.\n\n * `title`: The dialog's title text.\n * `text`: The dialog's main message text.\n * `informative_text`: The dialog's extra informative text.\n * `icon`: The dialog's GTK stock icon name. Examples are\n "gtk-dialog-error", "gtk-dialog-info", "gtk-dialog-question", and\n "gtk-dialog-warning". The dialog does not display an icon by default.\n * `icon_file`: The dialog's icon file path. This option has no effect when\n `icon` is set.\n * `no_cancel`: Do not display the "Cancel" button. The default value is\n `false`.\n * `string_output`: Return the selected button's label (instead of its\n index) or the dialog's exit status instead of the button's index (instead\n of its exit 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 open io.open(filename [, mode])\nThis function opens a file, in the mode specified in the string `mode`. It\nreturns a new file handle, or, in case of errors, nil plus an error message.\n\nThe `mode` string can be any of the following:\n "r": read mode (the default);\n "w": write mode;\n "a": append mode;\n "r+": update mode, all previous data is preserved;\n "w+": update mode, all previous data is erased;\n "a+": append update mode, previous data is preserved, writing is only\n allowed at the end of file.\n\nThe `mode` string can also have a '`b`' at the end, which is needed in\nsome systems to open the file in binary mode. -open_file io.open_file(filenames)\nOpens *filenames*, a string filename or list of filenames, or the\nuser-selected filenames.\nEmits a `FILE_OPENED` event.\n@param filenames Optional string filename or table of filenames to open. If\n `nil`, the user is prompted with a fileselect dialog.\n@see _G.events +open_file io.open_file(filenames, encodings)\nOpens *filenames*, a string filename or list of filenames, or the\nuser-selected filenames.\nEmits a `FILE_OPENED` event.\n@param filenames Optional string filename or table of filenames to open. If\n `nil`, the user is prompted with a fileselect dialog.\n@param encodings Optional string encoding or table of encodings file contents\n are in (one encoding per file). If `nil`, encoding auto-detection is\n attempted via `io.encodings`.\n@see _G.events open_image _M.rest.open_image()\nOpens the image specified in an "image" or "figure" directive on the current\nline. open_recent_file io.open_recent_file()\nPrompts the user to select a recently opened file to be reopened.\n@see recent_files optionselect ui.dialogs.optionselect(options)\nPrompts the user with an option selection dialog defined by dialog options\ntable *options*, returning the selected button's index along with the indices\nof the selected options.\nIf *options*.`string_output` is `true`, returns the selected button's label\nalong with the text of the selected options.\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 option select dialog.\n\n * `title`: The dialog's title text.\n * `text`: The dialog's main message text.\n * `items`: The list of string options to show in the option group.\n * `button1`: The right-most button's label. The default value is\n `_L['_OK']`.\n * `button2`: The middle button's label.\n * `button3`: The left-most button's label. This option requires `button2`\n to be set.\n * `select`: The indices of initially selected options.\n * `string_output`: Return the selected button's label or the dialog's exit\n status along with the selected options' text instead of the button's\n index or the dialog's exit code along with the options' indices. 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@usage ui.dialogs.optionselect{title = 'Language',\n informative_text = 'Check the languages you understand'\n items = {'English', 'Romanian'}, select = 1, string_output = true}\n@return selected button or exit code, list of selected options @@ -1103,7 +1103,7 @@ style_underline buffer.style_underline (table)\nTable of flags that indicate whe style_visible buffer.style_visible (table)\nTable of flags that indicate whether or not text is visible for style\nnumbers from `0` to `255`.\nThe default values are `true`. sub string.sub(s, i [, j])\nReturns the substring of `s` that starts at `i` and continues until\n`j`; `i` and `j` can be negative. If `j` is absent, then it is assumed to\nbe equal to -1 (which is the same as the string length). In particular,\nthe call `string.sub(s,1,j)` returns a prefix of `s` with length `j`, and\n`string.sub(s, -i)` returns a suffix of `s` with length `i`.\n\nIf, after the translation of negative indices, `i` is less than 1, it is\ncorrected to 1. If `j` is greater than the string length, it is corrected to\nthat length. If, after these corrections, `i` is greater than `j`, the\nfunction returns the empty string. swap_main_anchor_caret buffer.swap_main_anchor_caret(buffer)\nSwaps the main selection's beginning and end positions.\n@param buffer A buffer. -switch_buffer ui.switch_buffer()\nPrompts the user to select a buffer to switch to. +switch_buffer ui.switch_buffer(zorder)\nPrompts the user to select a buffer to switch to.\nBuffers are listed in the order they were opened unless `zorder` is `true`,\nin which case buffers are listed by their z-order (most recently viewed to\nleast recently viewed).\n@param zorder Flag that indicates whether or not to list buffers by their\n z-order. The default value is `false`. symlinkattributes lfs.symlinkattributes(filepath [, aname])\nIdentical to lfs.attributes except that it obtains information about the link\nitself (not the file it refers to). This function is not available in Windows\nso you may want to make sure that lfs.symlinkattributes exists before using\nit. tab buffer.tab(buffer)\nIndents the text on the selected lines or types a Tab character ("\t") at\nthe caret position.\n@param buffer A buffer. tab_context_menu textadept.menu.tab_context_menu (table)\nThe default tabbar context menu.\nSubmenus, and menu items can be retrieved by name in addition to table index\nnumber. |