From f10a48801dd09bb6cb058b4f783f879720d22bf0 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sun, 25 Sep 2011 22:37:24 -0400 Subject: Refactored textadept.c and changed Lua interface a bit. '_BUFFERS' and '_VIEWS' now also have buffer and view keys with index values; 'buffer.doc_pointer', 'view.doc_pointer', and 'gui.focused_doc_pointer' are no longer used; 'buffer:check_global()' replaces 'gui.check_focused_buffer()'; Added 'view.buffer' field; 'view:goto_buffer()' and 'gui.goto_view()' arguments changed to make more sense. --- modules/lua/api | 600 ++++++++++++++++++--------------------- modules/lua/tags | 59 +--- modules/textadept/find.lua | 27 +- modules/textadept/keys.lua | 12 +- modules/textadept/menu.lua | 12 +- modules/textadept/mime_types.lua | 6 +- modules/textadept/session.lua | 25 +- 7 files changed, 323 insertions(+), 418 deletions(-) (limited to 'modules') diff --git a/modules/lua/api b/modules/lua/api index e60ed9d9..fd0f3bc1 100644 --- a/modules/lua/api +++ b/modules/lua/api @@ -41,6 +41,8 @@ DEFAULT lexer.DEFAULT\n\n DEFAULT_DEPTH _m.textadept.snapopen.DEFAULT_DEPTH [number]\nMaximum directory depth to search. The default value is 4.\n DEFAULT_SESSION _m.textadept.session.DEFAULT_SESSION [string]\nThe path to the default session file.\n DOUBLE_CLICK events.DOUBLE_CLICK\nCalled when the mouse button is double-clicked.\n * `position`: The text position of the double click.\n * `line`: The line of the double click.\n * `modifiers`: The key modifiers held down. It is a combination of zero\n or more of `_SCINTILLA.constants.SCMOD_ALT`,\n `_SCINTILLA.constants.SCMOD_CTRL`,\n `_SCINTILLA.constants.SCMOD_SHIFT`, and\n `_SCINTILLA.constants.SCMOD_META`.\n\n +DWELL_END events.DWELL_END\nCalled after a `DWELL_START` and the mouse is moved or other activity such\nas key press indicates the dwell is over.\n * `position`: The nearest position in the document to the position\n where the mouse pointer was lingering.\n * `x`: Where the pointer lingered.\n * `y`: Where the pointer lingered.\n\n +DWELL_START events.DWELL_START\nCalled when the user keeps the mouse in one position for the dwell period\n(see `_SCINTILLA.constants.SCI_SETMOUSEDWELLTIME`).\n * `position`: The nearest position in the document to the position\n where the mouse pointer was lingering.\n * `x`: Where the pointer lingered.\n * `y`: Where the pointer lingered.\n\n EDGE_BACKGROUND _SCINTILLA.constants.EDGE_BACKGROUND\n2\n EDGE_LINE _SCINTILLA.constants.EDGE_LINE\n1\n EDGE_NONE _SCINTILLA.constants.EDGE_NONE\n0\n @@ -58,7 +60,6 @@ HIGHLIGHT_BRACES _m.textadept.editing.HIGHLIGHT_BRACES [bool]\nHighlight matchin HOTSPOT_CLICK events.HOTSPOT_CLICK\nCalled when the user clicks on text that is in a style with the hotspot\nattribute set.\n * `position`: The text position of the click.\n * `modifiers`: The key modifiers held down. It is a combination of zero\n or more of `_SCINTILLA.constants.SCMOD_ALT`,\n `_SCINTILLA.constants.SCMOD_CTRL`,\n `_SCINTILLA.constants.SCMOD_SHIFT`, and\n `_SCINTILLA.constants.SCMOD_META`.\n\n HOTSPOT_DOUBLE_CLICK events.HOTSPOT_DOUBLE_CLICK\nCalled when the user double clicks on text that is in a style with the\nhotspot attribute set.\n * `position`: The text position of the double click.\n * `modifiers`: The key modifiers held down. It is a combination of zero\n or more of `_SCINTILLA.constants.SCMOD_ALT`,\n `_SCINTILLA.constants.SCMOD_CTRL`,\n `_SCINTILLA.constants.SCMOD_SHIFT`, and\n `_SCINTILLA.constants.SCMOD_META`.\n\n HOTSPOT_RELEASE_CLICK events.HOTSPOT_RELEASE_CLICK\nCalled when the user releases the mouse on text that is in a style with the\nhotspot attribute set.\n * `position`: The text position of the release.\n\n -HUGE_VAL math.HUGE_VAL\nThe value `HUGE_VAL`, a value larger than or equal to any other numerical\nvalue.\n IDENTIFIER lexer.IDENTIFIER\n\n INDIC0_MASK _SCINTILLA.constants.INDIC0_MASK\n32\n INDIC1_MASK _SCINTILLA.constants.INDIC1_MASK\n64\n @@ -696,7 +697,7 @@ VISIBLE_SLOP _SCINTILLA.constants.VISIBLE_SLOP\n1\n VISIBLE_STRICT _SCINTILLA.constants.VISIBLE_STRICT\n4\n WHITESPACE lexer.WHITESPACE\n\n WIN32 _G.WIN32 [bool]\nIf Textadept is running on Windows, this flag is `true`.\n -_BUFFERS _G._BUFFERS [table]\nA numerically indexed table of open buffers in Textadept.\n +_BUFFERS _G._BUFFERS [table]\nTable of all open buffers in Textadept. Numeric keys have buffer values and\nbuffer keys have their associated numeric keys.\n _CHARSET _G._CHARSET [string]\nThe character set encoding of the filesystem. This is used in File I/O.\n _EMBEDDEDRULES lexer._EMBEDDEDRULES [table]\nSet of rules for an embedded lexer. For a parent lexer name, contains child's\n`start_rule`, `token_rule`, and `end_rule` patterns.\n _G _G._G [module]\nLua _G module.\n @@ -709,7 +710,7 @@ _SCINTILLA _G._SCINTILLA [module]\nScintilla constants, functions, and propertie _THEME _G._THEME [string]\nThe theme file to use.\n _USERHOME _G._USERHOME [string]\nPath to the user's `~/.textadept/`.\n _VERSION _G._VERSION\nA global variable (not a function) that holds a string containing the current\ninterpreter version. The current contents of this variable is "`Lua 5.1`".\n -_VIEWS _G._VIEWS [table]\nA numerically indexed table of views in Textadept.\n +_VIEWS _G._VIEWS [table]\nTable of all views in Textadept. Numeric keys have view values and view keys\nhave their associated numeric keys.\n _cancel_current _m.textadept.snippets._cancel_current()\nCancels the active snippet, reverting to the state before its activation,\nand restores the previously running snippet (if any).\n _insert _m.textadept.snippets._insert(text)\nInserts a snippet.\n@param text Optional snippet text. If none is specified, the snippet text\nis determined from the trigger and lexer.\n@return false if no snippet was expanded; true otherwise.\n _m _G._m [module]\nA table of loaded modules.\n @@ -719,8 +720,8 @@ _select _m.textadept.snippets._select()\nPrompts the user to select a snippet to abs math.abs(x)\nReturns the absolute value of `x`.\n acos math.acos(x)\nReturns the arc cosine of `x` (in radians).\n add _m.textadept.bookmarks.add()\nAdds a bookmark to the current line.\n -add_selection buffer.add_selection(buffer, caret, anchor)\nAdd a selection from anchor to caret as the main selection. Retainings all\nother selections as additional selections. Since there is always at least one\nselection, to set a list of selections, the first selection should be added\nwith `buffer:set_selection()` and later selections added with this function.\n@param buffer The focused buffer.\n@param caret The caret.\n@param anchor The anchor.\n -add_text buffer.add_text(buffer, text)\nAdd text to the document at current position. The current position is set\nat the end of the inserted text, but it is not scrolled into view.\n@param buffer The focused buffer.\n@param text The text to add.\n +add_selection buffer.add_selection(buffer, caret, anchor)\nAdd a selection from anchor to caret as the main selection. Retainings all\nother selections as additional selections. Since there is always at least one\nselection, to set a list of selections, the first selection should be added\nwith `buffer:set_selection()` and later selections added with this function.\n@param buffer The global buffer.\n@param caret The caret.\n@param anchor The anchor.\n +add_text buffer.add_text(buffer, text)\nAdd text to the document at current position. The current position is set\nat the end of the inserted text, but it is not scrolled into view.\n@param buffer The global buffer.\n@param text The text to add.\n add_trigger _m.textadept.adeptsense.add_trigger(sense, c, only_fields, only_functions)\nSets the trigger for autocompletion.\n@param sense The adeptsense returned by adeptsense.new().\n@param c The character(s) that triggers the autocompletion. You can have up\nto two characters.\n@param only_fields If true, this trigger only completes fields. Defaults\nto false.\n@param only_functions If true, this trigger only completes functions. Defaults\nto false.\n@usage sense:add_trigger('.')\n@usage sense:add_trigger(':', false, true) -- only functions\n@usage sense:add_trigger('->')\n additional_caret_fore buffer.additional_caret_fore [number]\nThe foreground color of additional carets in 0xBBGGRR format.\n additional_carets_blink buffer.additional_carets_blink [bool]\nWhether additional carets will blink.\n @@ -730,21 +731,21 @@ additional_sel_back buffer.additional_sel_back [number]\nThe background color of additional_sel_fore buffer.additional_sel_fore [number]\nThe foreground color of additional selections in 0xBBGGRR\nformat. `buffer:set_sel_fore(true, ...)` must have been called previously\nfor this to have an effect.\n additional_selection_typing buffer.additional_selection_typing [bool]\nWhether typing can be performed into multiple selections.\n adeptsense _m.textadept.adeptsense [module]\nLanguage autocompletion support for the textadept module.\n -allocate buffer.allocate(buffer, bytes)\nEnlarge the document to a particular size of text bytes. The document will\nnot be made smaller than its current contents.\n@param buffer The focused buffer.\n +allocate buffer.allocate(buffer, bytes)\nEnlarge the document to a particular size of text bytes. The document will\nnot be made smaller than its current contents.\n@param buffer The global buffer.\n alnum lexer.alnum\nMatches any alphanumeric character (`A-Z`, `a-z`, `0-9`).\n alpha lexer.alpha\nMatches any alphabetic character (`A-Z`, `a-z`).\n always_show_globals _m.textadept.adeptsense.always_show_globals [bool]\nInclude globals in the list of completions offered. Globals are classes,\nfunctions, and fields that do not belong to another class. They are contained\nin `completions['']`. The default value is `true`.\n anchor buffer.anchor [number]\nThe position of the opposite end of the selection to the caret.\n -annotation_clear_all buffer.annotation_clear_all(buffer)\nClear the annotations from all lines.\n@param buffer The focused buffer.\n -annotation_get_text buffer.annotation_get_text(buffer, line)\nGet the annotation text for a line.\n@param buffer The focused buffer.\n@param line The line number.\n@return string\n +annotation_clear_all buffer.annotation_clear_all(buffer)\nClear the annotations from all lines.\n@param buffer The global buffer.\n +annotation_get_text buffer.annotation_get_text(buffer, line)\nGet the annotation text for a line.\n@param buffer The global buffer.\n@param line The line number.\n@return string\n annotation_lines buffer.annotation_lines [table]\nTable of the number of annotation lines for lines starting from\nzero. (Read-only)\n -annotation_set_text buffer.annotation_set_text(buffer, line, text)\nSet the annotation text for a line.\n@param buffer The focused buffer.\n@param line The line number.\n@param text The text.\n +annotation_set_text buffer.annotation_set_text(buffer, line, text)\nSet the annotation text for a line.\n@param buffer The global buffer.\n@param line The line number.\n@param text The text.\n annotation_style buffer.annotation_style [table]\nTable of style numbers for annotations for lines starting at zero.\n annotation_style_offset buffer.annotation_style_offset [number]\nThe start of the range of style numbers used for annotations. Annotation\nstyles may be completely separated from standard text styles by setting a\nstyle offset. For example, setting this to 512 would allow the annotation\nstyles to be numbered from 512 upto 767 so they do not overlap styles set\nby lexers (or margins if margins offset is 256). Each style number set with\n`buffer.annotation_style` has the offset added before looking up the style.\n annotation_visible buffer.annotation_visible [number]\nThe visibility of annotations.\n * `_SCINTILLA.constants.ANNOTATION_HIDDEN` (0): Annotations are not\n displayed.\n * `_SCINTILLA.constants.ANNOTATION_STANDARD` (1): Annotations are drawn\n left justified with no adornment.\n * `_SCINTILLA.constants.ANNOTATION_BOXED` (2): Annotations are indented\n to match the text and are surrounded by a box.\n\n any lexer.any\nMatches any single character.\n api_files _m.textadept.adeptsense.api_files [table]\nContains a list of api files used by show_apidoc(). Each line in the api file\ncontains a symbol name (not the full symbol) followed by a space character\nand then the symbol's documentation. Since there may be many duplicate symbol\nnames, it is recommended to put the full symbol and arguments, if any, on the\nfirst line. (e.g. Class.function(arg1, arg2, ...)). This allows the correct\ndocumentation to be shown based on the current context. In the documentation,\nnewlines are represented with '\\n'. A '\' before '\\n' escapes the newline.\n -append_text buffer.append_text(buffer, text)\nAppend a string to the end of the document without changing the selection. The\ncurrent selection is not changed and the new text is not scrolled into view.\n@param buffer The focused buffer.\n@param text The text.\n +append_text buffer.append_text(buffer, text)\nAppend a string to the end of the document without changing the selection. The\ncurrent selection is not changed and the new text is not scrolled into view.\n@param buffer The global buffer.\n@param text The text.\n arg _G.arg [table]\nCommand line parameters.\n args _G.args [module]\nProcesses command line arguments for Textadept.\n ascii lexer.ascii\nMatches any ASCII character (`0`..`127`).\n @@ -755,54 +756,55 @@ atan2 math.atan2(y, x)\nReturns the arc tangent of `y/x` (in radians), but uses attributes lfs.attributes(filepath [, aname])\nReturns a table with the file attributes corresponding to filepath (or\nnil followed by an error message in case of error). If the second optional\nargument is given, then only the value of the named attribute is returned\n(this use is equivalent to lfs.attributes(filepath).aname, but the table is not\ncreated and only one attribute is retrieved from the O.S.). The attributes are\ndescribed as follows; attribute mode is a string, all the others are numbers,\nand the time related attributes use the same time reference of os.time: dev:\non Unix systems, this represents the device that the inode resides on. On\nWindows systems, represents the drive number of the disk containing the file\nino: on Unix systems, this represents the inode number. On Windows systems\nthis has no meaning mode: string representing the associated protection mode\n(the values could be file, directory, link, socket, named pipe, char device,\nblock device or other) nlink: number of hard links to the file uid: user-id\nof owner (Unix only, always 0 on Windows) gid: group-id of owner (Unix only,\nalways 0 on Windows) rdev: on Unix systems, represents the device type, for\nspecial file inodes. On Windows systems represents the same as dev access:\ntime of last access modification: time of last data modification change:\ntime of last file status change size: file size, in bytes blocks: block\nallocated for file; (Unix only) blksize: optimal file system I/O blocksize;\n(Unix only) This function uses stat internally thus if the given filepath is\na symbolic link, it is followed (if it points to another link the chain is\nfollowed recursively) and the information is about the file it refers to. To\nobtain information about the link itself, see function lfs.symlinkattributes.\n auto_c_active buffer.auto_c_active(buffer)\nIs there an auto-completion list visible?\n@return bool\n auto_c_auto_hide buffer.auto_c_auto_hide [bool]\nWhether or not autocompletion is hidden automatically when nothing matches. By\ndefault, the list is cancelled if there are no viable matches (the user has\ntyped characters that no longer match a list entry).\n -auto_c_cancel buffer.auto_c_cancel(buffer)\nRemove the auto-completion list from the screen. A set of characters that\nwill cancel autocompletion can be specified with buffer:auto_c_stops().\n@param buffer The focused buffer.\n +auto_c_cancel buffer.auto_c_cancel(buffer)\nRemove the auto-completion list from the screen. A set of characters that\nwill cancel autocompletion can be specified with buffer:auto_c_stops().\n@param buffer The global buffer.\n auto_c_cancel_at_start buffer.auto_c_cancel_at_start [bool]\nWhether auto-completion is cancelled by backspacing to a position before\nwhere the box was created. If `false`, the list is not cancelled until the\ncaret moves before the first character of the word being completed. should\nbe cancelled if the user backspaces to a position before where it was created.\n auto_c_choose_single buffer.auto_c_choose_single [bool]\nWhether a single item auto-completion list automatically choose the item. The\ndefault is to display the list even if there is only a single item.\n -auto_c_complete buffer.auto_c_complete(buffer)\nUser has selected an item so remove the list and insert the selection. This\nhas the same effect as the tab key.\n@param buffer The focused buffer.\n +auto_c_complete buffer.auto_c_complete(buffer)\nUser has selected an item so remove the list and insert the selection. This\nhas the same effect as the tab key.\n@param buffer The global buffer.\n auto_c_drop_rest_of_word buffer.auto_c_drop_rest_of_word [bool]\nWhether or not autocompletion deletes any word characters after the inserted\ntext upon completion. The default is `false`.\n auto_c_fill_ups buffer.auto_c_fill_ups [string]\nA set of characters that when typed will cause the autocompletion to choose\nthe selected item. By default, no fillup characters are set. (Write-only)\n -auto_c_get_current buffer.auto_c_get_current(buffer)\nGet currently selected item position in the auto-completion list.\n@param buffer The focused buffer.\n@return number\n -auto_c_get_current_text buffer.auto_c_get_current_text(buffer)\nGet currently selected item text in the auto-completion list.\n@param buffer The focused buffer.\n@return string\n +auto_c_get_current buffer.auto_c_get_current(buffer)\nGet currently selected item position in the auto-completion list.\n@param buffer The global buffer.\n@return number\n +auto_c_get_current_text buffer.auto_c_get_current_text(buffer)\nGet currently selected item text in the auto-completion list.\n@param buffer The global buffer.\n@return string\n auto_c_ignore_case buffer.auto_c_ignore_case [bool]\nWhether case is significant when performing auto-completion searches. By\ndefault, matching of characters to list members is case sensitive.\n auto_c_max_height buffer.auto_c_max_height [number]\nThe maximum height, in rows, of auto-completion and user lists. The default\nis 5 rows.\n auto_c_max_width buffer.auto_c_max_width [number]\nThe maximum width, in characters, of auto-completion and user lists. Set to\n0 to autosize to fit longest item, which is the default.\n -auto_c_pos_start buffer.auto_c_pos_start(buffer)\nRetrieve the position of the caret when the auto-completion list was displayed.\n@param buffer The focused buffer.\n@return number\n -auto_c_select buffer.auto_c_select(buffer, string)\nSelect the item in the auto-completion list that starts with a string. By\ndefault, comparisons are case sensitive, but this can change with\nbuffer.auto_c_ignore_case.\n@param buffer The focused buffer.\n +auto_c_pos_start buffer.auto_c_pos_start(buffer)\nRetrieve the position of the caret when the auto-completion list was displayed.\n@param buffer The global buffer.\n@return number\n +auto_c_select buffer.auto_c_select(buffer, string)\nSelect the item in the auto-completion list that starts with a string. By\ndefault, comparisons are case sensitive, but this can change with\nbuffer.auto_c_ignore_case.\n@param buffer The global buffer.\n auto_c_separator buffer.auto_c_separator [number]\nThe auto-completion list separator character byte. The default is the space\ncharacter.\n auto_c_show buffer.auto_c_show(buffer, len_entered, item_list)\nDisplay an auto-completion list.\n@param len_entered The number of characters before the caret used to provide\nthe context.\n@param item_list List of words separated by separator characters (initially\nspaces). The list of words should be in sorted order.\n -auto_c_stops buffer.auto_c_stops(buffer, chars)\nDefine a set of characters that when typed cancel the auto-completion list.\n@param buffer The focused buffer.\n@param chars String list of characters. This list is empty by default.\n +auto_c_stops buffer.auto_c_stops(buffer, chars)\nDefine a set of characters that when typed cancel the auto-completion list.\n@param buffer The global buffer.\n@param chars String list of characters. This list is empty by default.\n auto_c_type_separator buffer.auto_c_type_separator [number]\nThe auto-completion list type-separator character byte. The default is\n'?'. Autocompletion list items may display an image as well as text. Each\nimage is first registered with an integer type. Then this integer is included\nin the text of the list separated by a '?' from the text.\n autocomplete_word _m.textadept.editing.autocomplete_word(word_chars)\nPops up an autocompletion list for the current word based on other words in\nthe document.\n@param word_chars String of chars considered to be part of words.\n@return true if there were completions to show; false otherwise.\n back_space_un_indents buffer.back_space_un_indents [bool]\nWhether a backspace pressed when caret is within indentation unindents.\n -back_tab buffer.back_tab(buffer)\nDedent the selected lines.\n@param buffer The focused buffer.\n -begin_undo_action buffer.begin_undo_action(buffer)\nStart a sequence of actions that is undone and redone as a unit. May be nested.\n@param buffer The focused buffer.\n +back_tab buffer.back_tab(buffer)\nDedent the selected lines.\n@param buffer The global buffer.\n +begin_undo_action buffer.begin_undo_action(buffer)\nStart a sequence of actions that is undone and redone as a unit. May be nested.\n@param buffer The global buffer.\n black lexer.colors.black\nBlack.\n block_comment _m.textadept.editing.block_comment(comment)\nBlock comments or uncomments code with a given comment string.\n@param comment The comment string inserted or removed from the beginning of\neach line in the selection.\n blue lexer.colors.blue\nBlue.\n boms io.boms [table]\nList of byte-order marks (BOMs).\n bookmarks _m.textadept.bookmarks [module]\nBookmarks for the textadept module.\n -brace_bad_light buffer.brace_bad_light(buffer, pos)\nHighlight the character at a position indicating there is no matching brace.\n@param buffer The focused buffer.\n@param pos The position or -1 to remove the highlight.\n -brace_bad_light_indicator buffer.brace_bad_light_indicator(buffer, use_indicator, indic_num)\nUse specified indicator to highlight non matching brace instead of changing\nits style.\n@param buffer The focused buffer.\n@param use_indicator Use an indicator.\n@param indic_num The indicator number.\n -brace_highlight buffer.brace_highlight(buffer, pos1, pos2)\nHighlight the characters at two positions. If indent guides are enabled,\nthe indent that corresponds with the brace can be highlighted by\nlocating the column with `buffer.column` and highlight the indent with\n`buffer.highlight_guide`.\n@param buffer The focused buffer.\n@param pos1 The first position.\n@param pos2 The second position.\n -brace_highlight_indicator buffer.brace_highlight_indicator(buffer, use_indicator, indic_num)\nUse specified indicator to highlight matching braces instead of changing\ntheir style.\n@param buffer The focused buffer.\n@param use_indicator Use an indicator.\n@param indic_num The indicator number.\n -brace_match buffer.brace_match(buffer, pos)\nFind the position of a matching brace or -1 if no match. The brace characters\nhandled are '(', ')', '[', ']', '{', '}', '<', and '>'. The search is\nforwards from an opening brace and backwards from a closing brace. A match\nonly occurs if the style of the matching brace is the same as the starting\nbrace or the matching brace is beyond the end of styling. Nested braces are\nhandled correctly.\n@param buffer The focused buffer.\n@param pos The position.\n@return number.\n +brace_bad_light buffer.brace_bad_light(buffer, pos)\nHighlight the character at a position indicating there is no matching brace.\n@param buffer The global buffer.\n@param pos The position or -1 to remove the highlight.\n +brace_bad_light_indicator buffer.brace_bad_light_indicator(buffer, use_indicator, indic_num)\nUse specified indicator to highlight non matching brace instead of changing\nits style.\n@param buffer The global buffer.\n@param use_indicator Use an indicator.\n@param indic_num The indicator number.\n +brace_highlight buffer.brace_highlight(buffer, pos1, pos2)\nHighlight the characters at two positions. If indent guides are enabled,\nthe indent that corresponds with the brace can be highlighted by\nlocating the column with `buffer.column` and highlight the indent with\n`buffer.highlight_guide`.\n@param buffer The global buffer.\n@param pos1 The first position.\n@param pos2 The second position.\n +brace_highlight_indicator buffer.brace_highlight_indicator(buffer, use_indicator, indic_num)\nUse specified indicator to highlight matching braces instead of changing\ntheir style.\n@param buffer The global buffer.\n@param use_indicator Use an indicator.\n@param indic_num The indicator number.\n +brace_match buffer.brace_match(buffer, pos)\nFind the position of a matching brace or -1 if no match. The brace characters\nhandled are '(', ')', '[', ']', '{', '}', '<', and '>'. The search is\nforwards from an opening brace and backwards from a closing brace. A match\nonly occurs if the style of the matching brace is the same as the starting\nbrace or the matching brace is beyond the end of styling. Nested braces are\nhandled correctly.\n@param buffer The global buffer.\n@param pos The position.\n@return number.\n braces _m.textadept.editing.braces [table]\nHighlighted brace characters. Keys are lexer language names and values\nare tables of characters that count as brace characters. This table can be\npopulated by language-specific modules.\n -buffer _G.buffer [module]\nThe current buffer in the currently focused view. It also represents the\nstructure of any buffer table in 'buffers'.\n +buffer _G.buffer [module]\nThe current buffer in the current view. It also represents the structure of\nany buffer table in 'buffers'.\n +buffer view.buffer [table]\nThe buffer this view contains. (Read-only)\n buffered_draw buffer.buffered_draw [bool]\nWhether drawing is buffered. If drawing is buffered then each line of text\nis drawn into a bitmap buffer before drawing it to the screen to avoid\nflicker. The default is for drawing to be buffered. first or directly onto\nthe screen.\n byte string.byte(s [, i [, j]])\nReturns the internal numerical codes of the characters `s[i]`, `s[i+1]`,\n···, `s[j]`. The default value for `i` is 1; the default value for `j` is\n`i`. Note that numerical codes are not necessarily portable across platforms.\n -call_tip_active buffer.call_tip_active(buffer)\nIs there an active call tip?\n@param buffer The focused buffer.\n@return bool\n +call_tip_active buffer.call_tip_active(buffer)\nIs there an active call tip?\n@param buffer The global buffer.\n@return bool\n call_tip_back buffer.call_tip_back [number]\nThe background color for the call tip in 0xBBGGRR format. (Write-only)\n -call_tip_cancel buffer.call_tip_cancel(buffer)\nRemove the call tip from the screen. Call tips are also removed if any\nkeyboard commands that are not compatible with editing the argument list of\na function are used.\n@param buffer The focused buffer.\n +call_tip_cancel buffer.call_tip_cancel(buffer)\nRemove the call tip from the screen. Call tips are also removed if any\nkeyboard commands that are not compatible with editing the argument list of\na function are used.\n@param buffer The global buffer.\n call_tip_fore buffer.call_tip_fore [number]\nThe foreground color for the call tip in 0xBBGGRR format. (Write-only)\n call_tip_fore_hlt buffer.call_tip_fore_hlt [number]\nThe foreground color for the highlighted part of the call tip in 0xBBGGRR\nformat. (Write-only)\n -call_tip_pos_start buffer.call_tip_pos_start(buffer)\nRetrieve the position where the caret was before displaying the call tip.\n@param buffer The focused buffer.\n@return number\n -call_tip_set_hlt buffer.call_tip_set_hlt(buffer, start_pos, end_pos)\nHighlights a segment of a call tip.\n@param buffer The focused buffer.\n@param start_pos The start position.\n@param end_pos The end position.\n -call_tip_show buffer.call_tip_show(buffer, pos, text)\nShow a call tip containing a definition near position pos. The call tip text\nis aligned to start 1 line below this character unless up and/or down arrows\nhave been included in the call tip text in which case the tip is aligned to\nthe right-hand edge of the rightmost arrow. The assumption is that the text\nstarts with something like "\001 1 of 3 \002".\n@param buffer The focused buffer.\n@param pos The position.\n@param text The text.\n +call_tip_pos_start buffer.call_tip_pos_start(buffer)\nRetrieve the position where the caret was before displaying the call tip.\n@param buffer The global buffer.\n@return number\n +call_tip_set_hlt buffer.call_tip_set_hlt(buffer, start_pos, end_pos)\nHighlights a segment of a call tip.\n@param buffer The global buffer.\n@param start_pos The start position.\n@param end_pos The end position.\n +call_tip_show buffer.call_tip_show(buffer, pos, text)\nShow a call tip containing a definition near position pos. The call tip text\nis aligned to start 1 line below this character unless up and/or down arrows\nhave been included in the call tip text in which case the tip is aligned to\nthe right-hand edge of the rightmost arrow. The assumption is that the text\nstarts with something like "\001 1 of 3 \002".\n@param buffer The global buffer.\n@param pos The position.\n@param text The text.\n call_tip_use_style buffer.call_tip_use_style [number]\nEnable use of `_SCINTILLA.constants.STYLE_CALLTIP` and set call tip tab\nsize in pixels. If the tab size is less than 1, Tab characters are not\ntreated specially.\n -can_paste buffer.can_paste(buffer)\nWill a paste succeed?\n@param buffer The focused buffer.\n@return bool\n -can_redo buffer.can_redo(buffer)\nAre there any redoable actions in the undo history?\n@param buffer The focused buffer.\n@return bool\n -can_undo buffer.can_undo(buffer)\nAre there any undoable actions in the undo history?\n@param buffer The focused buffer.\n@return bool\n -cancel buffer.cancel(buffer)\nCancel any modes such as call tip or auto-completion list display.\n@param buffer The focused buffer.\n +can_paste buffer.can_paste(buffer)\nWill a paste succeed?\n@param buffer The global buffer.\n@return bool\n +can_redo buffer.can_redo(buffer)\nAre there any redoable actions in the undo history?\n@param buffer The global buffer.\n@return bool\n +can_undo buffer.can_undo(buffer)\nAre there any undoable actions in the undo history?\n@param buffer The global buffer.\n@return bool\n +cancel buffer.cancel(buffer)\nCancel any modes such as call tip or auto-completion list display.\n@param buffer The global buffer.\n caret_fore buffer.caret_fore [number]\nThe foreground color of the caret in 0xBBGGRR format.\n caret_line_back buffer.caret_line_back [number]\nThe color of the background of the line containing the caret in 0xBBGGRR\nformat.\n caret_line_back_alpha buffer.caret_line_back_alpha [number]\nThe background alpha of the caret line. Alpha ranges from 0 (transparent)\nto 255 (opaque) or 256 for no alpha.\n @@ -812,33 +814,33 @@ caret_sticky buffer.caret_sticky [number]\nThe caret preferred x position changi caret_style buffer.caret_style [number]\nThe style of the caret to be drawn.\n * `_SCINTILLA.constants.CARETSTYLE_INVISIBLE` (0): Not draw the caret\n at all.\n * `_SCINTILLA.constants.CARETSTYLE_LINE` (1): A line caret. This is the\n default value.\n * `_SCINTILLA.constants.CARETSTYLE_BLOCK` (2): A block caret.\n\n caret_width buffer.caret_width [number]\nThe width of the insert mode caret in pixels. Can be 0, 1, 2 or 3 pixels. The\ndefault width is 1 pixel. This setting only affects the width of the cursor\nwhen the cursor style is set to line caret mode, it does not affect the\nwidth for a block caret.\n ceil math.ceil(x)\nReturns the smallest integer larger than or equal to `x`.\n -change_lexer_state buffer.change_lexer_state(buffer, start_pos, end_pos)\nIndicate that the internal state of a lexer has changed over a range and\ntherefore there may be a need to redraw.\n@param buffer The focused buffer.\n@param start_pos The start position.\n@param end_pos The end position.\n +change_lexer_state buffer.change_lexer_state(buffer, start_pos, end_pos)\nIndicate that the internal state of a lexer has changed over a range and\ntherefore there may be a need to redraw.\n@param buffer The global buffer.\n@param start_pos The start position.\n@param end_pos The end position.\n char string.char(···)\nReceives zero or more integers. Returns a string with length equal to the\nnumber of arguments, in which each character has the internal numerical\ncode equal to its corresponding argument. Note that numerical codes are not\nnecessarily portable across platforms.\n char_at buffer.char_at [table]\nTable of character bytes at positions in the document starting at\nzero. (Read-only)\n -char_left buffer.char_left(buffer)\nMove caret left one character.\n@param buffer The focused buffer.\n -char_left_extend buffer.char_left_extend(buffer)\nMove caret left one character extending selection to new caret position.\n@param buffer The focused buffer.\n -char_left_rect_extend buffer.char_left_rect_extend(buffer)\nMove caret left one character, extending rectangular selection to new caret\nposition.\n@param buffer The focused buffer.\n +char_left buffer.char_left(buffer)\nMove caret left one character.\n@param buffer The global buffer.\n +char_left_extend buffer.char_left_extend(buffer)\nMove caret left one character extending selection to new caret position.\n@param buffer The global buffer.\n +char_left_rect_extend buffer.char_left_rect_extend(buffer)\nMove caret left one character, extending rectangular selection to new caret\nposition.\n@param buffer The global buffer.\n char_matches _m.textadept.editing.char_matches [table]\nAuto-matched characters. Used for auto-matching parentheses, brackets, braces,\nquotes, etc. Keys are lexer language names and values are tables of character\nmatch pairs. This table can be populated by language-specific modules.\n -char_position_from_point buffer.char_position_from_point(buffer, x, y)\nFind the position of a character from a point within the window.\n@param buffer The focused buffer.\n@return number\n -char_position_from_point_close buffer.char_position_from_point_close(buffer, x, y)\nFind the position of a character from a point within the window. Return -1\nif not close to text.\n@param buffer The focused buffer.\n@return number\n -char_right buffer.char_right(buffer)\nMove caret right one character.\n@param buffer The focused buffer.\n -char_right_extend buffer.char_right_extend(buffer)\nMove caret right one character extending selection to new caret position.\n@param buffer The focused buffer.\n -char_right_rect_extend buffer.char_right_rect_extend(buffer)\nMove caret right one character, extending rectangular selection to new\ncaret position.\n@param buffer The focused buffer.\n +char_position_from_point buffer.char_position_from_point(buffer, x, y)\nFind the position of a character from a point within the window.\n@param buffer The global buffer.\n@return number\n +char_position_from_point_close buffer.char_position_from_point_close(buffer, x, y)\nFind the position of a character from a point within the window. Return -1\nif not close to text.\n@param buffer The global buffer.\n@return number\n +char_right buffer.char_right(buffer)\nMove caret right one character.\n@param buffer The global buffer.\n +char_right_extend buffer.char_right_extend(buffer)\nMove caret right one character extending selection to new caret position.\n@param buffer The global buffer.\n +char_right_rect_extend buffer.char_right_rect_extend(buffer)\nMove caret right one character, extending rectangular selection to new\ncaret position.\n@param buffer The global buffer.\n chdir lfs.chdir(path)\nChanges the current working directory to the given path. Returns true in\ncase of success or nil plus an error string.\n -check_focused_buffer gui.check_focused_buffer(buffer)\nChecks if the buffer being indexed is the currently focused buffer. This is\nnecessary because any buffer actions are performed in the focused views'\nbuffer, which may not be the buffer being indexed. Throws an error if the\ncheck fails.\n@param buffer The buffer in question.\n -choose_caret_x buffer.choose_caret_x(buffer)\nSet the last x chosen value to be the caret x position. The view remembers\nthe x value of the last position horizontally moved to explicitly by the\nuser and this value is then used when moving vertically such as by using the\nup and down keys. This function sets the current x position of the caret as\nthe remembered value.\n@param buffer The focused buffer.\n +check_global buffer.check_global(buffer)\nChecks whether the given buffer is the global one. If not, throws an error\nindicating so. It is necessary to call this at the top of all buffer functions\nto avoid unexpected behavior since most buffer functions operate on the global\n'buffer', which is not necessarily the given one.\n@param buffer The buffer to check.\n +choose_caret_x buffer.choose_caret_x(buffer)\nSet the last x chosen value to be the caret x position. The view remembers\nthe x value of the last position horizontally moved to explicitly by the\nuser and this value is then used when moving vertically such as by using the\nup and down keys. This function sets the current x position of the caret as\nthe remembered value.\n@param buffer The global buffer.\n class_definition _m.textadept.adeptsense.syntax.class_definition\nA Lua pattern representing the language's class definition syntax. The first\ncapture returned must be the class name. A second, optional capture contains\nthe class' superclass (if any). If no completions are found for the class\nname, completions for the superclass are shown (if any). Completions will\nnot be shown for both a class and superclass unless defined in a previously\nloaded ctags file. Also, multiple superclasses cannot be recognized by this\npattern; use a ctags file instead. Defaults to 'class%s+([%w_]+)'.\n clear _m.textadept.adeptsense.clear(sense)\nClears an adeptsense. This is necessary for loading a new ctags file or\ncompletions from a different project.\n@param sense The adeptsense returned by adeptsense.new().\n clear _m.textadept.bookmarks.clear()\nClears all bookmarks in the current buffer.\n -clear buffer.clear(buffer)\nClear the selection.\n@param buffer The focused buffer.\n -clear_all buffer.clear_all(buffer)\nDelete all text in the document.\n@param buffer The focused buffer.\n -clear_all_cmd_keys buffer.clear_all_cmd_keys(buffer)\nDrop all key mappings.\n@param buffer The focused buffer.\n -clear_document_style buffer.clear_document_style(buffer)\nSet all style bytes to 0, remove all folding information.\n@param buffer The focused buffer.\n -clear_registered_images buffer.clear_registered_images(buffer)\nClear all the registered XPM images.\n@param buffer The focused buffer.\n -clear_selections buffer.clear_selections(buffer)\nClear selections to a single empty stream selection.\n@param buffer The focused buffer.\n +clear buffer.clear(buffer)\nClear the selection.\n@param buffer The global buffer.\n +clear_all buffer.clear_all(buffer)\nDelete all text in the document.\n@param buffer The global buffer.\n +clear_all_cmd_keys buffer.clear_all_cmd_keys(buffer)\nDrop all key mappings.\n@param buffer The global buffer.\n +clear_document_style buffer.clear_document_style(buffer)\nSet all style bytes to 0, remove all folding information.\n@param buffer The global buffer.\n +clear_registered_images buffer.clear_registered_images(buffer)\nClear all the registered XPM images.\n@param buffer The global buffer.\n +clear_selections buffer.clear_selections(buffer)\nClear selections to a single empty stream selection.\n@param buffer The global buffer.\n clipboard_text gui.clipboard_text [string]\nThe text on the clipboard. (Read-only)\n clock os.clock()\nReturns an approximation of the amount in seconds of CPU time used by the\nprogram.\n -close buffer.close(buffer)\nCloses the current buffer.\n@param buffer The focused buffer. If the buffer is dirty, the user is prompted\nto continue. The buffer is not saved automatically. It must be done manually.\n +close buffer.close(buffer)\nCloses the current buffer.\n@param buffer The global buffer. If the buffer is dirty, the user is prompted\nto continue. The buffer is not saved automatically. It must be done manually.\n close file:close()\nCloses `file`. Note that files are automatically closed when their handles are\ngarbage collected, but that takes an unpredictable amount of time to happen.\n close io.close([file])\nEquivalent to `file:close()`. Without a `file`, closes the default output file.\n close_all io.close_all()\nCloses all open buffers. If any buffer is dirty, the user is prompted to\ncontinue. No buffers are saved automatically. They must be saved manually.\n@usage io.close_all()\n@return true if user did not cancel.\n @@ -847,7 +849,7 @@ code_page buffer.code_page [number]\nThe code page used to interpret the bytes o collectgarbage _G.collectgarbage(opt [, arg])\nThis function is a generic interface to the garbage collector. It performs\ndifferent functions according to its first argument, `opt`: "stop": stops the\ngarbage collector. "restart": restarts the garbage collector. "collect":\nperforms a full garbage-collection cycle. "count": returns the total\nmemory in use by Lua (in Kbytes). "step": performs a garbage-collection\nstep. The step "size" is controlled by `arg` (larger values mean more\nsteps) in a non-specified way. If you want to control the step size you\nmust experimentally tune the value of `arg`. Returns true if the step\nfinished a collection cycle. "setpause": sets `arg` as the new value for\nthe *pause* of the collector (see §2.10). Returns the previous value for\n*pause*. "setstepmul": sets `arg` as the new value for the *step multiplier*\nof the collector (see §2.10). Returns the previous value for *step*.\n color lexer.color(r, g, b)\nCreates a Scintilla color.\n@param r The string red component of the hexadecimal color.\n@param g The string green component of the color.\n@param b The string blue component of the color.\n@usage local red = color('FF', '00', '00')\n colors lexer.colors [table]\nTable of common colors for a theme. This table should be redefined in\neach theme.\n -colourise buffer.colourise(buffer, start_pos, end_pos)\ncolorise a segment of the document using the current lexing language.\n@param buffer The focused buffer.\n@param start_pos The start position.\n@param end_pos The end position or -1 to style from start_pos to the end of\nthe document.\n +colourise buffer.colourise(buffer, start_pos, end_pos)\ncolorise a segment of the document using the current lexing language.\n@param buffer The global buffer.\n@param start_pos The start position.\n@param end_pos The end position or -1 to style from start_pos to the end of\nthe document.\n column buffer.column [table]\nTable of column numbers, taking tab widths into account, for positions\nstarting from zero. (Read-only)\n command_entry gui.command_entry [module]\nTextadept's Command entry.\n comment_string _m.textadept.editing.comment_string [table]\nComment strings for various lexer languages. Used for the block_comment()\nfunction. Keys are lexer language names and values are the line comment\ndelimiters for the language. This table is typically populated by\nlanguage-specific modules.\n@see block_comment\n @@ -861,16 +863,15 @@ connect events.connect(event, f, index)\nAdds a handler function to an event.\n@ constants _SCINTILLA.constants [table]\nScintilla constants.\n context_menu _m.textadept.menu.context_menu [table]\nContains the right-click context menu.\n context_menu gui.context_menu\nA GTK menu defining the editor's context menu.\n -contracted_fold_next buffer.contracted_fold_next(buffer, line_start)\nFind the next line at or after line_start that is a contracted fold header\nline. Return -1 when no more lines.\n@param buffer The focused buffer.\n@param line_start The start line number.\n@return number\n +contracted_fold_next buffer.contracted_fold_next(buffer, line_start)\nFind the next line at or after line_start that is a contracted fold header\nline. Return -1 when no more lines.\n@param buffer The global buffer.\n@param line_start The start line number.\n@return number\n control_char_symbol buffer.control_char_symbol [number]\nThe way control characters are displayed. If less than 32, keep the rounded\nrectangle as ASCII mnemonics. Otherwise, use the given character byte. The\ndefault value is 0.\n control_structure_patterns _m.lua.control_structure_patterns [table]\nPatterns for auto 'end' completion for control structures.\n@see try_to_autocomplete_end\n -control_structure_patterns _m.ruby.control_structure_patterns [table]\nPatterns for auto 'end' completion for control structures.\n@see try_to_autocomplete_end\n -convert_eo_ls buffer.convert_eo_ls(buffer, mode)\nConverts all line endings in the document to one mode.\n@param buffer The focused buffer.\n@param mode The line ending mode. Valid values are:\n_SCINTILLA.constants.SC_EOL_CRLF (0), _SCINTILLA.constants.SC_EOL_CR (1),\nor _SCINTILLA.constants.SC_EOL_LF (2).\n +convert_eo_ls buffer.convert_eo_ls(buffer, mode)\nConverts all line endings in the document to one mode.\n@param buffer The global buffer.\n@param mode The line ending mode. Valid values are:\n_SCINTILLA.constants.SC_EOL_CRLF (0), _SCINTILLA.constants.SC_EOL_CR (1),\nor _SCINTILLA.constants.SC_EOL_LF (2).\n convert_indentation _m.textadept.editing.convert_indentation()\nConverts indentation between tabs and spaces.\n copy buffer.copy(buffer)\nCopy the selection to the clipboard.\n@param buffer The buffer\n -copy_allow_line buffer.copy_allow_line(buffer)\nCopy the selection, if selection empty copy the line with the caret.\n@param buffer The focused buffer.\n -copy_range buffer.copy_range(buffer, start_pos, end_pos)\nCopy a range of text to the clipboard. Positions are clipped into the document.\n@param buffer The focused buffer.\n@param start_pos The start position.\n@param end_pos The end position.\n -copy_text buffer.copy_text(buffer, text)\nCopy argument text to the clipboard.\n@param buffer The focused buffer.\n@param text The text.\n +copy_allow_line buffer.copy_allow_line(buffer)\nCopy the selection, if selection empty copy the line with the caret.\n@param buffer The global buffer.\n +copy_range buffer.copy_range(buffer, start_pos, end_pos)\nCopy a range of text to the clipboard. Positions are clipped into the document.\n@param buffer The global buffer.\n@param start_pos The start position.\n@param end_pos The end position.\n +copy_text buffer.copy_text(buffer, text)\nCopy argument text to the clipboard.\n@param buffer The global buffer.\n@param text The text.\n coroutine _G.coroutine [module]\nLua coroutine module.\n cos math.cos(x)\nReturns the cosine of `x` (assumed to be in radians).\n cosh math.cosh(x)\nReturns the hyperbolic cosine of `x`.\n @@ -879,27 +880,24 @@ cpp _G.keys.cpp [table]\nContainer for C/C++-specific key commands.\n cpp _G.snippets.cpp [table]\nContainer for C/C++-specific snippets.\n cpp _m.cpp [module]\nThe cpp module. It provides utilities for editing C/C++ code. User tags\nare loaded from _USERHOME/modules/cpp/tags and user apis are loaded from\n_USERHOME/modules/cpp/api.\n create coroutine.create(f)\nCreates a new coroutine, with body `f`. `f` must be a Lua function. Returns\nthis new coroutine, an object with type `"thread"`.\n -css _G.keys.css [table]\nContainer for CSS-specific key commands.\n -css _G.snippets.css [table]\nContainer for CSS-specific snippets.\n -css _m.css [module]\nThe css module. It provides utilities for editing CSS code. User tags\nare loaded from _USERHOME/modules/css/tags and user apis are loaded from\n_USERHOME/modules/css/api.\n ctags_kinds _m.textadept.adeptsense.ctags_kinds [table]\nContains a map of ctags kinds to adeptsense kinds. Recognized kinds are\n'functions', 'fields', and 'classes'. Classes are quite simply containers\nfor functions and fields so Lua modules would count as classes. Any other\nkinds will be passed to handle_ctag() for user-defined handling.\n@see handle_ctag\n current_pos buffer.current_pos [number]\nThe position of the caret. When setting, the caret is not scrolled into view.\n current_word _m.textadept.editing.current_word(action)\nSelects the current word under the caret and if action indicates, deletes it.\n@param action Optional action to perform with selected word. If 'delete',\nit is deleted.\n currentdir lfs.currentdir()\nReturns a string with the current working directory or nil plus an error\nstring.\n cursor buffer.cursor [number]\nThe cursor type.\n * `_SCINTILLA.constants.SC_CURSORNORMAL` (-1): The normal cursor is\n displayed.\n * `_SCINTILLA.constants.SC_CURSORWAIT` (4): The wait cursor is\n displayed when the mouse is over the view.\n\n -cut buffer.cut(buffer)\nCut the selection to the clipboard.\n@param buffer The focused buffer.\n +cut buffer.cut(buffer)\nCut the selection to the clipboard.\n@param buffer The global buffer.\n date os.date([format [, time]])\nReturns a string or a table containing date and time, formatted according to\nthe given string `format`. If the `time` argument is present, this is the\ntime to be formatted (see the `os.time` function for a description of this\nvalue). Otherwise, `date` formats the current time. If `format` starts with\n'`!`', then the date is formatted in Coordinated Universal Time. After\nthis optional character, if `format` is the string "`*t`", then `date`\nreturns a table with the following fields: `year` (four digits), `month`\n(1--12), `day` (1--31), `hour` (0--23), `min` (0--59), `sec` (0--61), `wday`\n(weekday, Sunday is 1), `yday` (day of the year), and `isdst` (daylight\nsaving flag, a boolean). If `format` is not "`*t`", then `date` returns the\ndate as a string, formatted according to the same rules as the C function\n`strftime`. When called without arguments, `date` returns a reasonable date\nand time representation that depends on the host system and on the current\nlocale (that is, `os.date()` is equivalent to `os.date("%c")`).\n debug _G.debug [module]\nLua debug module.\n debug debug.debug()\nEnters an interactive mode with the user, running each string that the user\nenters. Using simple commands and other debug facilities, the user can inspect\nglobal and local variables, change their values, evaluate expressions, and so\non. A line containing only the word `cont` finishes this function, so that\nthe caller continues its execution. Note that commands for `debug.debug`\nare not lexically nested within any function, and so have no direct access\nto local variables.\n dec_num lexer.dec_num\nMatches a decimal number.\n deg math.deg(x)\nReturns the angle `x` (given in radians) in degrees.\n -del_line_left buffer.del_line_left(buffer)\nDelete back from the current position to the start of the line.\n@param buffer The focused buffer.\n -del_line_right buffer.del_line_right(buffer)\nDelete forwards from the current position to the end of the line.\n@param buffer The focused buffer.\n -del_word_left buffer.del_word_left(buffer)\nDelete the word to the left of the caret.\n@param buffer The focused buffer.\n -del_word_right buffer.del_word_right(buffer)\nDelete the word to the right of the caret.\n@param buffer The focused buffer.\n -del_word_right_end buffer.del_word_right_end(buffer)\nDelete the word to the right of the caret, but not the trailing non-word\ncharacters.\n@param buffer The focused buffer.\n -delete buffer.delete(buffer)\nDeletes the current buffer. WARNING: this function should NOT be called via\nscripts. io provides a close() function for buffers to prompt for confirmation\nif necessary; this function does not. Activates the 'buffer_deleted' signal.\n@param buffer The focused buffer.\n -delete_back buffer.delete_back(buffer)\nDelete the selection or if no selection, the character before the caret.\n@param buffer The focused buffer.\n +del_line_left buffer.del_line_left(buffer)\nDelete back from the current position to the start of the line.\n@param buffer The global buffer.\n +del_line_right buffer.del_line_right(buffer)\nDelete forwards from the current position to the end of the line.\n@param buffer The global buffer.\n +del_word_left buffer.del_word_left(buffer)\nDelete the word to the left of the caret.\n@param buffer The global buffer.\n +del_word_right buffer.del_word_right(buffer)\nDelete the word to the right of the caret.\n@param buffer The global buffer.\n +del_word_right_end buffer.del_word_right_end(buffer)\nDelete the word to the right of the caret, but not the trailing non-word\ncharacters.\n@param buffer The global buffer.\n +delete buffer.delete(buffer)\nDeletes the current buffer. WARNING: this function should NOT be called via\nscripts. io provides a close() function for buffers to prompt for confirmation\nif necessary; this function does not. Activates the 'buffer_deleted' signal.\n@param buffer The global buffer.\n +delete_back buffer.delete_back(buffer)\nDelete the selection or if no selection, the character before the caret.\n@param buffer The global buffer.\n delete_back_not_line buffer.delete_back_not_line(buffer)\nDelete the selection or if no selection, the character before the caret. Will\nnot delete the character before at the start of a line.\n delimited_range lexer.delimited_range(chars, escape, end_optional, balanced, forbidden)\nCreates an LPeg pattern that matches a range of characters delimitted by a\nspecific character(s). This can be used to match a string, parenthesis, etc.\n@param chars The character(s) that bound the matched range.\n@param escape Optional escape character. This parameter may be omitted, nil,\nor the empty string.\n@param end_optional Optional flag indicating whether or not an ending delimiter\nis optional or not. If true, the range begun by the start delimiter matches\nuntil an end delimiter or the end of the input is reached.\n@param balanced Optional flag indicating whether or not a balanced range is\nmatched, like `%b` in Lua's `string.find`. This flag only applies if `chars`\nconsists of two different characters (e.g. '()').\n@param forbidden Optional string of characters forbidden in a delimited\nrange. Each character is part of the set.\n@usage local sq_str_noescapes = delimited_range("'")\n@usage local sq_str_escapes = delimited_range("'", '\\', true)\n@usage local unbalanced_parens = delimited_range('()', '\\', true)\n@usage local balanced_parens = delimited_range('()', '\\', true, true)\n dialog gui.dialog(kind, ...)\nDisplays a CocoaDialog of a specified type with the given string\narguments. Each argument is like a string in Lua's 'arg' table. Tables of\nstrings are allowed as arguments and are expanded in place. This is useful\nfor filteredlist dialogs with many items.\n@return string CocoaDialog result.\n @@ -910,33 +908,31 @@ direct_function buffer.direct_function [number]\nA pointer to a function that pr direct_pointer buffer.direct_pointer [number]\nA pointer value to use as the first argument when calling the function\nreturned by direct_function. (Read-only)\n dirty buffer.dirty [bool]\nFlag indicating whether or not the buffer has been modified since it was\nlast saved.\n disconnect events.disconnect(event, index)\nDisconnects a handler function from an event.\n@param event The string event name.\n@param index Index of the handler (returned by events.connect).\n@see connect\n -doc_line_from_visible buffer.doc_line_from_visible(buffer)\nFind the document line of a display line taking hidden lines into account.\n@param buffer The focused buffer.\n@return number\n -doc_pointer buffer.doc_pointer [number]\nA pointer to the document object. (Read-only)\n -doc_pointer view.doc_pointer [number]\nThe pointer to the document associated with this view's buffer. (Read-only)\n +doc_line_from_visible buffer.doc_line_from_visible(buffer)\nFind the document line of a display line taking hidden lines into account.\n@param buffer The global buffer.\n@return number\n docstatusbar_text gui.docstatusbar_text [string]\nThe text displayed by the doc statusbar. (Write-only)\n -document_end buffer.document_end(buffer)\nMove caret to last position in document.\n@param buffer The focused buffer.\n -document_end_extend buffer.document_end_extend(buffer)\nMove caret to last position in document extending selection to new caret\nposition.\n@param buffer The focused buffer.\n -document_start buffer.document_start(buffer)\nMove caret to first position in document.\n@param buffer The focused buffer.\n -document_start_extend buffer.document_start_extend(buffer)\nMove caret to first position in document extending selection to new caret\nposition.\n@param buffer The focused buffer.\n +document_end buffer.document_end(buffer)\nMove caret to last position in document.\n@param buffer The global buffer.\n +document_end_extend buffer.document_end_extend(buffer)\nMove caret to last position in document extending selection to new caret\nposition.\n@param buffer The global buffer.\n +document_start buffer.document_start(buffer)\nMove caret to first position in document.\n@param buffer The global buffer.\n +document_start_extend buffer.document_start_extend(buffer)\nMove caret to first position in document extending selection to new caret\nposition.\n@param buffer The global buffer.\n dofile _G.dofile(filename)\nOpens the named file and executes its contents as a Lua chunk. When called\nwithout arguments, `dofile` executes the contents of the standard input\n(`stdin`). Returns all values returned by the chunk. In case of errors,\n`dofile` propagates the error to its caller (that is, `dofile` does not run\nin protected mode).\n dump string.dump(function)\nReturns a string containing a binary representation of the given function,\nso that a later `loadstring` on this string returns a copy of the\nfunction. `function` must be a Lua function without upvalues.\n edge_colour buffer.edge_colour [number]\nThe color used in edge indication in 0xBBGGRR format.\n edge_column buffer.edge_column [number]\nThe column number which text should be kept within.\n edge_mode buffer.edge_mode [number]\nThe edge highlight mode.\n * `_SCINTILLA.constants.EDGE_NONE` (0): Long lines are not marked. This\n is the default state.\n * `_SCINTILLA.constants.EDGE_LINE` (1): A vertical line is drawn at the\n column number set by `buffer.edge_column`.\n * `_SCINTILLA.constants.EDGE_BACKGROUND` (2): The background color of\n characters after the column limit is changed to the color set by\n `buffer.edge_colour`.\n\n -edit_toggle_overtype buffer.edit_toggle_overtype(buffer)\nSwitch from insert to overtype mode or the reverse.\n@param buffer The focused buffer.\n +edit_toggle_overtype buffer.edit_toggle_overtype(buffer)\nSwitch from insert to overtype mode or the reverse.\n@param buffer The global buffer.\n editing _m.textadept.editing [module]\nEditing commands for the textadept module.\n embed_lexer lexer.embed_lexer(parent, child, start_rule, end_rule)\nEmbeds a child lexer language in a parent one.\n@param parent The parent lexer.\n@param child The child lexer.\n@param start_rule The token that signals the beginning of the embedded lexer.\n@param end_rule The token that signals the end of the embedded lexer.\n@usage embed_lexer(_M, css, css_start_rule, css_end_rule)\n@usage embed_lexer(html, _M, php_start_rule, php_end_rule)\n@usage embed_lexer(html, ruby, ruby_start_rule, rule_end_rule)\n emit events.emit(event, ...)\nCalls all handlers for the given event in sequence (effectively "generating"\nthe event). If true or false is explicitly returned by any handler, the\nevent is not propagated any further; iteration ceases.\n@param event The string event name.\n@param ... Arguments passed to the handler.\n@return true or false if any handler explicitly returned such; nil otherwise.\n -empty_undo_buffer buffer.empty_undo_buffer(buffer)\nDelete the undo history. It also sets the save point to the start of the\nundo buffer, so the document will appear to be unmodified.\n@param buffer The focused buffer.\n +empty_undo_buffer buffer.empty_undo_buffer(buffer)\nDelete the undo history. It also sets the save point to the start of the\nundo buffer, so the document will appear to be unmodified.\n@param buffer The global buffer.\n enclose _m.textadept.editing.enclose(left, right)\nEncloses text within a given pair of strings. If text is selected, it is\nenclosed. Otherwise, the previous word is enclosed.\n@param left The left part of the enclosure.\n@param right The right part of the enclosure.\n -encoded_from_utf8 buffer.encoded_from_utf8(buffer, string)\nTranslates a UTF8 string into the document encoding. Return the length of\nthe result in bytes. On error return 0.\n@param buffer The focused buffer.\n@param string The string.\n@return number\n +encoded_from_utf8 buffer.encoded_from_utf8(buffer, string)\nTranslates a UTF8 string into the document encoding. Return the length of\nthe result in bytes. On error return 0.\n@param buffer The global buffer.\n@param string The string.\n@return number\n encoding buffer.encoding [string or nil]\nThe encoding of the file on the hard disk. It will be nil if the file is a\nbinary file.\n encoding_bom buffer.encoding_bom [string]\nThe byte-order mark of the file encoding (if any).\n end_at_last_line buffer.end_at_last_line [bool]\nWhether the maximum scroll position has the last line at the bottom of the\nview. If `false`, allows scrolling one page below the last line. The default\nvalue is `true`.\n end_styled buffer.end_styled [number]\nThe position of the last correctly styled character. (Read-only)\n -end_undo_action buffer.end_undo_action(buffer)\nEnd a sequence of actions that is undone and redone as a unit.\n@param buffer The focused buffer.\n -ensure_visible buffer.ensure_visible(buffer, line)\nEnsure a particular line is visible by expanding any header line hiding it.\n@param buffer The focused buffer.\n@param line The line number.\n -ensure_visible_enforce_policy buffer.ensure_visible_enforce_policy(buffer, line)\nEnsure a particular line is visible by expanding any header line hiding it. Use\nthe currently set visibility policy to determine which range to display.\n@param buffer The focused buffer.\n@param line The line number.\n +end_undo_action buffer.end_undo_action(buffer)\nEnd a sequence of actions that is undone and redone as a unit.\n@param buffer The global buffer.\n +ensure_visible buffer.ensure_visible(buffer, line)\nEnsure a particular line is visible by expanding any header line hiding it.\n@param buffer The global buffer.\n@param line The line number.\n +ensure_visible_enforce_policy buffer.ensure_visible_enforce_policy(buffer, line)\nEnsure a particular line is visible by expanding any header line hiding it. Use\nthe currently set visibility policy to determine which range to display.\n@param buffer The global buffer.\n@param line The line number.\n entry_text gui.command_entry.entry_text [string]\nThe text in the entry.\n eol_mode buffer.eol_mode [number]\nThe current end of line mode.\n * `_SCINTILLA.constants.SC_EOL_CRLF` (0): `CRLF`.\n * `_SCINTILLA.constants.SC_EOL_CR` (1): `CR`.\n * `_SCINTILLA.constants.SC_EOL_LF` (2): `LF`.\n\n error _G.error(message [, level])\nTerminates the last protected function called and returns `message` as the\nerror message. Function `error` never returns. Usually, `error` adds some\ninformation about the error position at the beginning of the message. The\n`level` argument specifies how to get the error position. With level 1 (the\ndefault), the error position is where the `error` function was called. Level\n2 points the error to where the function that called `error` was called; and\nso on. Passing a level 0 avoids the addition of error position information\nto the message.\n @@ -956,7 +952,7 @@ filter_through _m.textadept.filter_through.filter_through()\nPrompts for a Linux filteredlist gui.filteredlist(title, columns, items, int_return, ...)\nShortcut function for gui.dialog('filtered_list', ...) with 'Ok' and 'Cancel'\nbuttons.\n@param title The title for the filteredlist dialog.\n@param columns A column name or list of column names.\n@param items An item or list of items.\n@param int_return If true, returns the integer index of the selected item\nin the filteredlist. Defaults to false, which returns the string item. Not\ncompatible with a '--select-multiple' filteredlist.\n@param ... Additional parameters to pass to gui.dialog().\n@usage gui.filteredlist('Title', 'Foo', { 'Bar', 'Baz' })\n@usage gui.filteredlist('Title', { 'Foo', 'Bar' }, { 'a', 'b', 'c', 'd' },\nfalse, '--output-column', '2')\n@return Either a string or integer on success; nil otherwise.\n find gui.find [module]\nTextadept's integrated find/replace dialog.\n find string.find(s, pattern [, init [, plain]])\nLooks for the first match of `pattern` in the string `s`. If it finds a\nmatch, then `find` returns the indices of `s` where this occurrence starts\nand ends; otherwise, it returns nil. A third, optional numerical argument\n`init` specifies where to start the search; its default value is 1 and can\nbe negative. A value of true as a fourth, optional argument `plain` turns off\nthe pattern matching facilities, so the function does a plain "find substring"\noperation, with no characters in `pattern` being considered "magic". Note that\nif `plain` is given, then `init` must be given as well. If the pattern has\ncaptures, then in a successful match the captured values are also returned,\nafter the two indices.\n -find_column buffer.find_column(buffer, line, column)\nFind the position of a column on a line taking into account tabs and multi-byte\ncharacters. If beyond end of line, return line end position.\n@param buffer The focused buffer.\n@param line The line number.\n@param column The column number.\n +find_column buffer.find_column(buffer, line, column)\nFind the position of a column on a line taking into account tabs and multi-byte\ncharacters. If beyond end of line, return line end position.\n@param buffer The global buffer.\n@param line The line number.\n@param column The column number.\n find_entry_text gui.find.find_entry_text [string]\nThe text in the find entry.\n find_in_files gui.find.find_in_files(utf8_dir)\nPerforms a find in files with the given directory. Use the gui.find fields\nto set the text to find and find options.\n@param utf8_dir UTF-8 encoded directory name. If none is provided, the user\nis prompted for one.\n find_incremental gui.find.find_incremental()\nBegins an incremental find using the Lua command entry. Lua command\nfunctionality will be unavailable until the search is finished (pressing\n'Escape' by default).\n @@ -974,42 +970,40 @@ fmod math.fmod(x, y)\nReturns the remainder of the division of `x` by `y` that r focus buffer.focus [bool]\nThe internal focus flag.\n focus gui.command_entry.focus()\nFocuses the command entry.\n focus gui.find.focus()\nDisplays and focuses the find/replace dialog.\n -focus view:focus()\nFocuses the indexed view if it hasn't been already.\n -focused_doc_pointer gui.focused_doc_pointer [number]\nThe pointer to the document associated with the buffer of the currently\nfocused view. (Read-only)\n fold lexer.fold(text, start_pos, start_line, start_level)\nFolds the given text. Called by LexLPeg.cxx; do not call from Lua. If the\ncurrent lexer has no _fold function, folding by indentation is performed if\nthe 'fold.by.indentation' property is set.\n@param text The document text to fold.\n@param start_pos The position in the document text starts at.\n@param start_line The line number text starts on.\n@param start_level The fold level text starts on.\n@return Table of fold levels.\n fold_expanded buffer.fold_expanded [bool]\nExpanded state of a header line.\n fold_level buffer.fold_level [table]\nTable of fold levels for lines starting from zero. Fold levels encodes an\ninteger level along witth flags indicating whether the line is a header and\nwhether it is effectively white space.\n * `_SCINTILLA.constants.SC_FOLDLEVELBASE` (0x400): Initial fold level.\n * `_SCINTILLA.constants.SC_FOLDLEVELWHITEFLAG` (0x1000): Indicates that\n the line is blank.\n * `_SCINTILLA.constants.SC_FOLDLEVELHEADERFLAG` (0x2000): Indicates\n that the line is a header (fold point).\n\n fold_line_comments lexer.fold_line_comments(prefix)\nReturns a fold function that folds consecutive line comments. This function\nshould be used inside the lexer's `_foldsymbols` table.\n@param prefix The prefix string defining a line comment.\n@usage [l.COMMENT] = { ['--'] = l.fold_line_comments('--') }\n@usage [l.COMMENT] = { ['//'] = l.fold_line_comments('//') }\n fold_parent buffer.fold_parent [table]\nTable of parent line numbers for child lines starting from zero. -1 means\nno line was found. (Read-only)\n font_quality buffer.font_quality [number]\nThe quality level for text. (Windows only)\n * `_SCINTILLA.constants.SC_EFF_QUALITY_DEFAULt` (0).\n * `_SCINTILLA.constants.SC_EFF_QUALITY_NON_ANTIALIASED` (1).\n * `_SCINTILLA.constants.SC_EFF_QUALITY_ANTIALIASED` (2).\n * `_SCINTILLA.constants.SC_EFF_QUALITY_LCD_OPTIMIZED` (3).\n\n -form_feed buffer.form_feed(buffer)\nInsert a Form Feed character.\n@param buffer The focused buffer.\n +form_feed buffer.form_feed(buffer)\nInsert a Form Feed character.\n@param buffer The global buffer.\n format string.format(formatstring, ···)\nReturns a formatted version of its variable number of arguments following\nthe description given in its first argument (which must be a string). The\nformat string follows the same rules as the `printf` family of standard C\nfunctions. The only differences are that the options/modifiers `*`, `l`,\n`L`, `n`, `p`, and `h` are not supported and that there is an extra option,\n`q`. The `q` option formats a string in a form suitable to be safely read back\nby the Lua interpreter: the string is written between double quotes, and all\ndouble quotes, newlines, embedded zeros, and backslashes in the string are\ncorrectly escaped when written. For instance, the call string.format('%q',\n'a string with "quotes" and \\n new line') will produce the string: "a string\nwith \"quotes\" and \ new line" The options `c`, `d`, `E`, `e`, `f`, `g`,\n`G`, `i`, `o`, `u`, `X`, and `x` all expect a number as argument, whereas\n`q` and `s` expect a string. This function does not accept string values\ncontaining embedded zeros, except as arguments to the `q` option.\n frexp math.frexp(x)\nReturns `m` and `e` such that *x = m2^e*, `e` is an integer and the absolute\nvalue of `m` is in the range *[0.5, 1)* (or zero when `x` is zero).\n functions _SCINTILLA.functions [table]\nScintilla functions.\n get_apidoc _m.textadept.adeptsense.get_apidoc(sense, symbol)\nReturns a list of apidocs for the given symbol. If there are multiple apidocs,\nthe index of one to display is the value of the 'pos' key in the returned list.\n@param sense The adeptsense returned by adeptsense.new().\n@param symbol The symbol to get apidocs for.\n@return apidoc_list or nil\n get_class _m.textadept.adeptsense.get_class(sense, symbol)\nReturns the class name for a given symbol. If the symbol is sense.syntax.self\nand a class definition using the sense.syntax.class_definition keyword\nis found, that class is returned. Otherwise the buffer is searched\nbackwards for a type declaration of the symbol according to the patterns\nin sense.syntax.type_declarations.\n@param sense The adeptsense returned by adeptsense.new().\n@param symbol The symbol to get the class of.\n@return class or nil\n@see syntax\n get_completions _m.textadept.adeptsense.get_completions(sense, symbol, only_fields,\nonly_functions)\nReturns a list of completions for the given symbol.\n@param sense The adeptsense returned by adeptsense.new().\n@param symbol The symbol to get completions for.\n@param only_fields If true, returns list of only fields; defaults to false.\n@param only_functions If true, returns list of only functions; defaults\nto false.\n@return completion_list or nil\n -get_cur_line buffer.get_cur_line(buffer)\nRetrieve the text of the line containing the caret. Also returns the index\nof the caret on the line.\n@param buffer The focused buffer.\n@return string, number\n +get_cur_line buffer.get_cur_line(buffer)\nRetrieve the text of the line containing the caret. Also returns the index\nof the caret on the line.\n@param buffer The global buffer.\n@return string, number\n get_fold_level lexer.get_fold_level(line, line_number)\nReturns the fold level for a given line. This level already has\n`SC_FOLDLEVELBASE` added to it, so you do not need to add it yourself.\n@param line_number The line number to get the fold level of.\n -get_hotspot_active_back buffer.get_hotspot_active_back(buffer)\nGet the back color for active hotspots in 0xBBGGRR format.\n@param buffer The focused buffer.\n@return number\n -get_hotspot_active_fore buffer.get_hotspot_active_fore(buffer)\nGet the fore color for active hotspots.\n@param buffer The focused buffer.\n@return number\n +get_hotspot_active_back buffer.get_hotspot_active_back(buffer)\nGet the back color for active hotspots in 0xBBGGRR format.\n@param buffer The global buffer.\n@return number\n +get_hotspot_active_fore buffer.get_hotspot_active_fore(buffer)\nGet the fore color for active hotspots.\n@param buffer The global buffer.\n@return number\n get_indent_amount lexer.get_indent_amount(line)\nReturns the indent amount of text for a given line.\n@param line The line number to get the indent amount of.\n -get_last_child buffer.get_last_child(buffer, header_line, level)\nFind the last child line of a header line.\n@param buffer The focused buffer.\n@param header_line The line number of a header line.\n@param level The level or -1 for the level of header_line.\n -get_lexer buffer.get_lexer(buffer)\nReplacement for buffer.get_lexer_language(buffer).\n@param buffer The focused buffer.\n -get_lexer_language buffer.get_lexer_language(buffer)\nRetrieve the name of the lexer.\n@param buffer The focused buffer.\n -get_line buffer.get_line(buffer, line)\nRetrieve the contents of a line. Also returns the length of the line.\n@param buffer The focused buffer.\n@param line The line number.\n@return string, number\n -get_line_sel_end_position buffer.get_line_sel_end_position(buffer, line)\nRetrieve the position of the end of the selection at the given line (-1 if\nno selection on this line).\n@param buffer The focused buffer.\n@param line The line number.\n -get_line_sel_start_position buffer.get_line_sel_start_position(buffer, line)\nRetrieve the position of the start of the selection at the given line (-1\nif no selection on this line).\n@param buffer The focused buffer.\n@param line The line number.\n -get_property buffer.get_property(buffer, key)\nRetrieve a "property" value previously set with `buffer.property`.\n@param buffer The focused buffer.\n@param key Keyword.\n@return string\n +get_last_child buffer.get_last_child(buffer, header_line, level)\nFind the last child line of a header line.\n@param buffer The global buffer.\n@param header_line The line number of a header line.\n@param level The level or -1 for the level of header_line.\n +get_lexer buffer.get_lexer(buffer)\nReplacement for buffer.get_lexer_language(buffer).\n@param buffer The global buffer.\n +get_lexer_language buffer.get_lexer_language(buffer)\nRetrieve the name of the lexer.\n@param buffer The global buffer.\n +get_line buffer.get_line(buffer, line)\nRetrieve the contents of a line. Also returns the length of the line.\n@param buffer The global buffer.\n@param line The line number.\n@return string, number\n +get_line_sel_end_position buffer.get_line_sel_end_position(buffer, line)\nRetrieve the position of the end of the selection at the given line (-1 if\nno selection on this line).\n@param buffer The global buffer.\n@param line The line number.\n +get_line_sel_start_position buffer.get_line_sel_start_position(buffer, line)\nRetrieve the position of the start of the selection at the given line (-1\nif no selection on this line).\n@param buffer The global buffer.\n@param line The line number.\n +get_property buffer.get_property(buffer, key)\nRetrieve a "property" value previously set with `buffer.property`.\n@param buffer The global buffer.\n@param key Keyword.\n@return string\n get_property lexer.get_property(key, default)\nReturns an integer property value for a given key.\n@param key The property key.\n@param default Optional integer value to return if key is not set.\n -get_property_expanded buffer.get_property_expanded(buffer, key)\nRetrieve a "property" value previously set with `buffer.property`, with\n"$()" variable replacement on returned buffer.\n@param buffer The focused buffer.\n@param key Keyword.\n@return string\n -get_sel_text buffer.get_sel_text(buffer)\nRetrieve the selected text. Also returns the length of the text.\n@param buffer The focused buffer.\n@return string, number\n +get_property_expanded buffer.get_property_expanded(buffer, key)\nRetrieve a "property" value previously set with `buffer.property`, with\n"$()" variable replacement on returned buffer.\n@param buffer The global buffer.\n@param key Keyword.\n@return string\n +get_sel_text buffer.get_sel_text(buffer)\nRetrieve the selected text. Also returns the length of the text.\n@param buffer The global buffer.\n@return string, number\n get_split_table gui.get_split_table()\nGets the current split view structure.\n@return table of split views. Each split view entry is a table with 4 fields:\n1, 2, vertical, and size. 1 and 2 have values of either split view entries\nor the index of the buffer shown in each view. vertical is a flag indicating\nif the split is vertical or not, and size is the integer position of the\nsplit resizer.\n get_style_at lexer.get_style_at(pos)\nReturns the string style name and style number at a given position.\n@param pos The position to get the style for.\n -get_style_name buffer.get_style_name(buffer, style_num)\nReturns the name of the style associated with a style number.\n@param buffer The focused buffer.\n@param style_num A style number in the range 0 <= style_num < 256.\n@see buffer.style_at\n +get_style_name buffer.get_style_name(buffer, style_num)\nReturns the name of the style associated with a style number.\n@param buffer The global buffer.\n@param style_num A style number in the range 0 <= style_num < 256.\n@see buffer.style_at\n get_symbol _m.textadept.adeptsense.get_symbol(sense)\nReturns a full symbol (if any) and current symbol part (if any) behind the\ncaret. For example: buffer.cur would return 'buffer' and 'cur'.\n@param sense The adeptsense returned by adeptsense.new().\n@return symbol or '', part or ''.\n -get_tag buffer.get_tag(buffer, tag_num)\nRetrieve the value of a tag from a regular expression search.\n@param buffer The focused buffer.\n@param tag_num The tag number.\n@return string\n -get_text buffer.get_text(buffer)\nRetrieve all the text in the document. Also returns number of characters\nretrieved.\n@param buffer The focused buffer.\n +get_tag buffer.get_tag(buffer, tag_num)\nRetrieve the value of a tag from a regular expression search.\n@param buffer The global buffer.\n@param tag_num The tag number.\n@return string\n +get_text buffer.get_text(buffer)\nRetrieve all the text in the document. Also returns number of characters\nretrieved.\n@param buffer The global buffer.\n getenv os.getenv(varname)\nReturns the value of the process environment variable `varname`, or nil if\nthe variable is not defined.\n getfenv _G.getfenv([f])\nReturns the current environment in use by the function. `f` can be a Lua\nfunction or a number that specifies the function at that stack level:\nLevel 1 is the function calling `getfenv`. If the given function is not a\nLua function, or if `f` is 0, `getfenv` returns the global environment. The\ndefault for `f` is 1.\n getfenv debug.getfenv(o)\nReturns the environment of object `o`.\n @@ -1022,48 +1016,44 @@ getregistry debug.getregistry()\nReturns the registry table (see §3.5).\n getupvalue debug.getupvalue(func, up)\nThis function returns the name and the value of the upvalue with index `up`\nof the function `func`. The function returns nil if there is no upvalue with\nthe given index.\n gmatch string.gmatch(s, pattern)\nReturns an iterator function that, each time it is called, returns the\nnext captures from `pattern` over string `s`. If `pattern` specifies no\ncaptures, then the whole match is produced in each call. As an example,\nthe following loop s = "hello world from Lua" for w in string.gmatch(s,\n"%a+") do print(w) end will iterate over all the words from string `s`,\nprinting one per line. The next example collects all pairs `key=value`\nfrom the given string into a table: t = {} s = "from=world, to=Lua" for k,\nv in string.gmatch(s, "(%w+)=(%w+)") do t[k] = v end For this function, a\n'`^`' at the start of a pattern does not work as an anchor, as this would\nprevent the iteration.\n goto _m.textadept.bookmarks.goto()\nGoes to selected bookmark from a filtered list.\n -goto_buffer view:goto_buffer(n, absolute)\nGoes to the specified buffer in the indexed view. Activates the\n'buffer_*_switch' signals.\n@param n A relative or absolute buffer index.\n@param absolute Flag indicating if n is an absolute index or not.\n +goto_buffer view:goto_buffer(n, relative)\nGoes to the specified buffer in the indexed view. Activates the\n'buffer_*_switch' signals.\n@param n A relative or absolute buffer index. An absolute index of -1 goes\nto the last buffer.\n@param relative Flag indicating if n is a relative index or not. Defaults\nto false.\n goto_ctag _m.textadept.adeptsense.goto_ctag(sense, k, title)\nDisplays a filteredlist of all known symbols of the given kind (classes,\nfunctions, fields, etc.) and jumps to the source of the selected one.\n@param sense The adeptsense returned by adeptsense.new().\n@param k The ctag character kind (e.g. 'f' for a Lua function).\n@param title The title for the filteredlist dialog.\n goto_error _m.textadept.run.goto_error(pos, line_num)\nWhen the user double-clicks an error message, go to the line in the file\nthe error occured at and display a calltip with the error message.\n@param pos The position of the caret.\n@param line_num The line double-clicked.\n@see error_detail\n goto_file_in_list gui.find.goto_file_in_list(next)\nGoes to the next or previous file found relative to the file on the current\nline.\n@param next Flag indicating whether or not to go to the next file.\n goto_line _m.textadept.editing.goto_line(line)\nGoes to the requested line.\n@param line Optional line number to go to.\n -goto_line buffer.goto_line(buffer, line)\nSet caret to start of a line and ensure it is visible.\n@param buffer The focused buffer.\n@param line The line number.\n +goto_line buffer.goto_line(buffer, line)\nSet caret to start of a line and ensure it is visible.\n@param buffer The global buffer.\n@param line The line number.\n goto_next _m.textadept.bookmarks.goto_next()\nGoes to the next bookmark in the current buffer.\n -goto_pos buffer.goto_pos(buffer, pos)\nSet caret to a position and ensure it is visible. The anchor position is\nset the same as the current position.\n@param buffer The focused buffer.\n@param pos The position.\n +goto_pos buffer.goto_pos(buffer, pos)\nSet caret to a position and ensure it is visible. The anchor position is\nset the same as the current position.\n@param buffer The global buffer.\n@param pos The position.\n goto_prev _m.textadept.bookmarks.goto_prev()\nGoes to the previous bookmark in the current buffer.\n goto_required _m.lua.goto_required()\nDetermines the Lua file being 'require'd, searches through package.path for\nthat file, and opens it in Textadept.\n -goto_required _m.php.goto_required()\nDetermines the PHP file being 'require'd or 'include'd, and opens it in\nTextadept.\n -goto_required _m.ruby.goto_required()\nDetermine the Ruby file being 'require'd, and search through the RUBYPATH\nfor that file and open it in Textadept.\n -goto_view gui.goto_view(n, absolute)\nGoes to the specified view. Activates the 'view_*_switch' signal.\n@param n A relative or absolute view index.\n@param absolute Flag indicating if n is an absolute index or not.\n -grab_focus buffer.grab_focus(buffer)\nSet the focus to this view.\n@param buffer The focused buffer.\n +goto_view gui.goto_view(n, relative)\nGoes to the specified view. Activates the 'view_*_switch' signal.\n@param n A relative or absolute view index.\n@param relative Flag indicating if n is a relative index or not. Defaults\nto false.\n +grab_focus buffer.grab_focus(buffer)\nSet the focus to this view.\n@param buffer The global buffer.\n graph lexer.graph\nMatches any graphical character (`!` to `~`).\n green lexer.colors.green\nGreen.\n grey lexer.colors.grey\nGrey.\n grow_selection _m.textadept.editing.grow_selection(amount)\nGrows the selection by a character amount on either end.\n@param amount The amount to grow the selection on either end.\n gsub string.gsub(s, pattern, repl [, n])\nReturns a copy of `s` in which all (or the first `n`, if given) occurrences\nof the `pattern` have been replaced by a replacement string specified by\n`repl`, which can be a string, a table, or a function. `gsub` also returns,\nas its second value, the total number of matches that occurred. If `repl`\nis a string, then its value is used for replacement. The character `%`\nworks as an escape character: any sequence in `repl` of the form `%n`, with\n*n* between 1 and 9, stands for the value of the *n*-th captured substring\n(see below). The sequence `%0` stands for the whole match. The sequence `%%`\nstands for a single `%`. If `repl` is a table, then the table is queried for\nevery match, using the first capture as the key; if the pattern specifies no\ncaptures, then the whole match is used as the key. If `repl` is a function,\nthen this function is called every time a match occurs, with all captured\nsubstrings passed as arguments, in order; if the pattern specifies no\ncaptures, then the whole match is passed as a sole argument. If the value\nreturned by the table query or by the function call is a string or a number,\nthen it is used as the replacement string; otherwise, if it is false or nil,\nthen there is no replacement (that is, the original match is kept in the\nstring). Here are some examples: x = string.gsub("hello world", "(%w+)",\n"%1 %1") --> x="hello hello world world" x = string.gsub("hello world", "%w+",\n"%0 %0", 1) --> x="hello hello world" x = string.gsub("hello world from Lua",\n"(%w+)%s*(%w+)", "%2 %1") --> x="world hello Lua from" x = string.gsub("home =\n$HOME, user = $USER", "%$(%w+)", os.getenv) --> x="home = /home/roberto, user =\nroberto" x = string.gsub("4+5 = $return 4+5$", "%$(.-)%$", function (s) return\nloadstring(s)() end) --> x="4+5 = 9" local t = {name="lua", version="5.1"}\nx = string.gsub("$name-$version.tar.gz", "%$(%w+)", t) --> x="lua-5.1.tar.gz"\n -gtkmenu gui.gtkmenu(menu_table)\nCreates a GTK menu, returning the userdata.\n@param menu_table A table defining the menu. It is an ordered list of\ntables with a string menu item and integer menu ID. The string menu item is\nhandled as follows: 'gtk-*' - a stock menu item is created based on the GTK\nstock-id. 'separator' - a menu separator item is created. Otherwise a regular\nmenu item with a mnemonic is created. Submenus are just nested menu-structure\ntables. Their title text is defined with a 'title' key.\n +gtkmenu gui.gtkmenu(menu_table)\nCreates a GTK menu, returning the userdata.\n@param menu_table A table defining the menu. It is an ordered list of tables\nwith a string menu item, integer menu ID, and optional keycode and modifier\nmask. The latter two are used to display key shortcuts in the menu. The string\nmenu item is handled as follows: 'gtk-*' - a stock menu item is created based\non the GTK stock-id. 'separator' - a menu separator item is created. Otherwise\na regular menu item with a mnemonic is created. Submenus are just nested\nmenu-structure tables. Their title text is defined with a 'title' key.\n@see keys.get_gdk_key\n gui _G.gui [module]\nThe core gui table.\n h_scroll_bar buffer.h_scroll_bar [bool]\nWhether the horizontal scroll bar is visible. Set to `false` to never see it\nand `true` to enable it again. The default state is to display it when needed.\n handle_clear _m.textadept.adeptsense.handle_clear(sense)\nCalled when clearing an adeptsense. This function should be replaced with\nyour own if you have any persistant objects that need to be deleted.\n@param sense The adeptsense returned by adeptsense.new().\n handle_ctag _m.textadept.adeptsense.handle_ctag(sense, tag_name, file_name, ex_cmd,\next_fields)\nCalled by load_ctags when a ctag kind is not recognized. This method should\nbe replaced with your own that is specific to the language.\n@param sense The adeptsense returned by adeptsense.new().\n@param tag_name The tag name.\n@param file_name The name of the file the tag belongs to.\n@param ex_cmd The ex_cmd returned by ctags.\n@param ext_fields The ext_fields returned by ctags.\n handlers events.handlers [table]\nA table of event names and a table of functions connected to them.\n hex_num lexer.hex_num\nMatches a hexadecimal number.\n -hide_lines buffer.hide_lines(buffer, start_line, end_line)\nMake a range of lines invisible. This has no effect on fold levels or fold\nflags. start_line can not be hidden.\n@param buffer The focused buffer.\n@param start_line The start line.\n@param end_line The end line.\n -hide_selection buffer.hide_selection(buffer, normal)\nDraw the selection in normal style or with selection highlighted.\n@param buffer The focused buffer.\n@param normal Draw normal selection.\n +hide_lines buffer.hide_lines(buffer, start_line, end_line)\nMake a range of lines invisible. This has no effect on fold levels or fold\nflags. start_line can not be hidden.\n@param buffer The global buffer.\n@param start_line The start line.\n@param end_line The end line.\n +hide_selection buffer.hide_selection(buffer, normal)\nDraw the selection in normal style or with selection highlighted.\n@param buffer The global buffer.\n@param normal Draw normal selection.\n highlight_guide buffer.highlight_guide [number]\nThe highlighted indentation guide column. Set to 0 to cancel this highlight.\n highlight_word _m.textadept.editing.highlight_word()\nHighlights all occurances of the word under the caret and adds markers to\nthe lines they are on.\n -home buffer.home(buffer)\nMove caret to first position on line.\n@param buffer The focused buffer.\n -home_display buffer.home_display(buffer)\nMove caret to first position on display line.\n@param buffer The focused buffer.\n -home_display_extend buffer.home_display_extend(buffer)\nMove caret to first position on display line extending selection to new\ncaret position.\n@param buffer The focused buffer.\n -home_extend buffer.home_extend(buffer)\nMove caret to first position on line extending selection to new caret position.\n@param buffer The focused buffer.\n -home_rect_extend buffer.home_rect_extend(buffer)\nMove caret to first position on line, extending rectangular selection to\nnew caret position.\n@param buffer The focused buffer.\n -home_wrap buffer.home_wrap(buffer)\nMove caret to the start of the display line when word-wrap is enabled. If\nalready there, go to the start of the document line.\n@param buffer The focused buffer.\n -home_wrap_extend buffer.home_wrap_extend(buffer)\nLike `buffer:home_wrap()` but extending selection to new caret position.\n@param buffer The focused buffer.\n +home buffer.home(buffer)\nMove caret to first position on line.\n@param buffer The global buffer.\n +home_display buffer.home_display(buffer)\nMove caret to first position on display line.\n@param buffer The global buffer.\n +home_display_extend buffer.home_display_extend(buffer)\nMove caret to first position on display line extending selection to new\ncaret position.\n@param buffer The global buffer.\n +home_extend buffer.home_extend(buffer)\nMove caret to first position on line extending selection to new caret position.\n@param buffer The global buffer.\n +home_rect_extend buffer.home_rect_extend(buffer)\nMove caret to first position on line, extending rectangular selection to\nnew caret position.\n@param buffer The global buffer.\n +home_wrap buffer.home_wrap(buffer)\nMove caret to the start of the display line when word-wrap is enabled. If\nalready there, go to the start of the document line.\n@param buffer The global buffer.\n +home_wrap_extend buffer.home_wrap_extend(buffer)\nLike `buffer:home_wrap()` but extending selection to new caret position.\n@param buffer The global buffer.\n hotspot_active_underline buffer.hotspot_active_underline [bool]\nWhether active hotspots are underlined.\n hotspot_single_line buffer.hotspot_single_line [bool]\nWhether hotspots are limited to single line so hotspots on two lines don't\nmerge.\n -hypertext _G.keys.hypertext [table]\nContainer for HTML-specific key commands.\n -hypertext _G.snippets.hypertext [table]\nContainer for HTML-specific snippets.\n -hypertext _m.hypertext [module]\nThe hypertext module. It provides utilities for editing HTML code. User tags\nare loaded from _USERHOME/modules/hypertext/tags and user apis are loaded\nfrom _USERHOME/modules/hypertext/api.\n +huge math.huge\nThe value `HUGE_VAL`, a value larger than or equal to any other numerical\nvalue.\n iconv string.iconv(text, to, from)\nConverts a string from one character set to another using iconv(). Valid\ncharacter sets are ones GLib's g_convert() accepts, typically GNU iconv's\ncharacter sets.\n@param text The text to convert.\n@param to The character set to convert to.\n@param from The character set to convert from.\n in_files gui.find.in_files [bool]\nSearch for the text in a list of files.\n in_files_label_text gui.find.in_files_label_text [string]\nThe text of the 'In files' label. This is primarily used for\nlocalization. (Write-only)\n @@ -1074,24 +1064,21 @@ indic_fore buffer.indic_fore [table]\nTable of foreground colors in 0xBBGGRR for indic_outline_alpha buffer.indic_outline_alpha [table]\nTable of alpha transparency values ranging from 0 (transparent) to 255\n(opaque) or 256 (no alpha) for indicators from 0 to 31. Used for drawing\nthe outline color of the `INDIC_ROUNDBOX` and `INDIC_STRAIGHTBOX` rectangle.\n indic_style buffer.indic_style [table]\nTable of styles for indicators from zero to 31.\n * `_SCINTILLA.constants.INDIC_PLAIN` (0): Underlined with a single,\n straight line.\n * `_SCINTILLA.constants.INDIC_SQUIGGLE` (1): A squiggly underline.\n Requires 3 pixels of descender space.\n * `_SCINTILLA.constants.INDIC_TT` (2): A line of small T shapes.\n * `_SCINTILLA.constants.INDIC_DIAGONAL` (3): Diagonal hatching.\n * `_SCINTILLA.constants.INDIC_STRIKE` (4): Strike out.\n * `_SCINTILLA.constants.INDIC_HIDDEN` (5): An indicator with no visual\n effect.\n * `_SCINTILLA.constants.INDIC_BOX` (6): A rectangle around the text.\n * `_SCINTILLA.constants.INDIC_ROUNDBOX` (7): A rectangle with rounded\n corners around the text using translucent drawing with the interior\n usually more transparent than the border. Use `buffer.indic_alpha`\n and `buffer.indic_outline_alpha` to control the alpha transparency\n values. The default alpha values are 30 for fill color and 50 for\n outline color.\n * `_SCINTILLA.constants.INDIC_STRAIGHTBOX` (8): A rectangle around the\n text using translucent drawing with the interior usually more\n transparent than the border. You can use `buffer.indic_alpha` and\n `buffer.indic_outline_alpha` to control the alpha transparency\n values. The default alpha values are 30 for fill color and 50 for\n outline color.\n * `_SCINTILLA.constants.INDIC_DASH` (9): A dashed underline.\n * `_SCINTILLA.constants.INDIC_DOTS` (10): A dotted underline.\n * `_SCINTILLA.constants.INDIC_SQUIGGLELOW` (11): Similar to\n `INDIC_SQUIGGLE` but only using 2 vertical pixels so will fit under\n small fonts.\n * `_SCINTILLA.constants.INDIC_DOTBOX` (12): A dotted rectangle around\n the text using translucent drawing. Translucency alternates between\n the alpha and outline alpha settings with the top-left pixel using\n the alpha setting. `buffer.indic_alpha` and\n `buffer.indic_outline_alpha` control the alpha transparency values.\n The default values are 30 for alpha and 50 for outline alpha. To\n avoid excessive memory allocation the maximum width of a dotted box\n is 4000 pixels.\n * Use `_SCINTILLA.next_indic_number()` for custom indicators.\n\n indic_under buffer.indic_under [table]\nTable of booleans for drawing under text or over (default) for indicators\nfrom zero to 31.\n -indicator_all_on_for buffer.indicator_all_on_for(buffer, pos)\nRetrieve a bitmap value representing which indicators are non-zero at a\nposition. Bit 0 is set if indicator 0 is present, bit 1 for indicator 1 and\nso on.\n@param buffer The focused buffer.\n@param pos The position.\n@return number\n -indicator_clear_range buffer.indicator_clear_range(buffer, pos, clear_length)\nTurn a indicator off over a range.\n@param buffer The focused buffer.\n@param pos The start position.\n@param clear_length The length.\n +indicator_all_on_for buffer.indicator_all_on_for(buffer, pos)\nRetrieve a bitmap value representing which indicators are non-zero at a\nposition. Bit 0 is set if indicator 0 is present, bit 1 for indicator 1 and\nso on.\n@param buffer The global buffer.\n@param pos The position.\n@return number\n +indicator_clear_range buffer.indicator_clear_range(buffer, pos, clear_length)\nTurn a indicator off over a range.\n@param buffer The global buffer.\n@param pos The start position.\n@param clear_length The length.\n indicator_current buffer.indicator_current [number]\nThe indicator in the range of 0 to 31 used for `buffer:indicator_fill_range()`\nand `buffer:indicator_clear_range()`.\n -indicator_end buffer.indicator_end(buffer, indicator, pos)\nFind the position where a particular indicator ends.\n@param buffer The focused buffer.\n@param indicator An indicator number in the range of 0 to 31.\n@param pos The position of the indicator.\n -indicator_fill_range buffer.indicator_fill_range(buffer, pos, fill_length)\nTurn a indicator on over a range. This function fills with the current\nindicator value.\n@param buffer The focused buffer.\n@param pos the start position.\n@param fill_length The length.\n -indicator_start buffer.indicator_start(buffer, indicator, pos)\nFind the position where a particular indicator starts.\n@param buffer The focused buffer.\n@param indicator An indicator number in the range of 0 to 31.\n@param pos The position of the indicator.\n +indicator_end buffer.indicator_end(buffer, indicator, pos)\nFind the position where a particular indicator ends.\n@param buffer The global buffer.\n@param indicator An indicator number in the range of 0 to 31.\n@param pos The position of the indicator.\n +indicator_fill_range buffer.indicator_fill_range(buffer, pos, fill_length)\nTurn a indicator on over a range. This function fills with the current\nindicator value.\n@param buffer The global buffer.\n@param pos the start position.\n@param fill_length The length.\n +indicator_start buffer.indicator_start(buffer, indicator, pos)\nFind the position where a particular indicator starts.\n@param buffer The global buffer.\n@param indicator An indicator number in the range of 0 to 31.\n@param pos The position of the indicator.\n indicator_value buffer.indicator_value [number]\nThe indicator value used for `buffer:indicator_fill_range()`. Currently all\nvalues are drawn the same.\n -indicator_value_at buffer.indicator_value_at(buffer, indicator, pos)\nRetrieve the value of a particular indicator at a position. Currently all\nvalues are drawn the same.\n@param buffer The focused buffer.\n@param indicator The indicator number in the range of 0 to 31.\n@param pos The position.\n@return number\n +indicator_value_at buffer.indicator_value_at(buffer, indicator, pos)\nRetrieve the value of a particular indicator at a position. Currently all\nvalues are drawn the same.\n@param buffer The global buffer.\n@param indicator The indicator number in the range of 0 to 31.\n@param pos The position.\n@return number\n inherited_classes _m.textadept.adeptsense.inherited_classes [table]\nContains a map of classes and a list of their inherited classes.\n input io.input([file])\nWhen called with a file name, it opens the named file (in text mode), and\nsets its handle as the default input file. When called with a file handle,\nit simply sets this file handle as the default input file. When called\nwithout parameters, it returns the current default input file. In case of\nerrors this function raises the error, instead of returning an error code.\n insert table.insert(table, [pos, ] value)\nInserts element `value` at position `pos` in `table`, shifting up other\nelements to open space, if necessary. The default value for `pos` is\n`n+1`, where `n` is the length of the table (see §2.5.5), so that a call\n`table.insert(t,x)` inserts `x` at the end of table `t`.\n -insert_text buffer.insert_text(buffer, pos, text)\nInsert string at a position. If the current position is after the insertion\npoint then it is moved along with its surrounding text but no scrolling\nis performed.\n@param buffer The focused buffer.\n@param pos The position to insert text at or -1 for the current position.\n@param text The text to insert.\n +insert_text buffer.insert_text(buffer, pos, text)\nInsert string at a position. If the current position is after the insertion\npoint then it is moved along with its surrounding text but no scrolling\nis performed.\n@param buffer The global buffer.\n@param pos The position to insert text at or -1 for the current position.\n@param text The text to insert.\n integer lexer.integer\nMatches a decimal, hexadecimal, or octal number.\n io _G.io [module]\nLua io module.\n ipairs _G.ipairs(t)\nReturns three values: an iterator function, the table `t`, and 0, so that\nthe construction for i,v in ipairs(t) do *body* end will iterate over the\npairs (`1,t[1]`), (`2,t[2]`), ···, up to the first integer key absent\nfrom the table.\n -java _G.keys.java [table]\nContainer for Java-specific key commands.\n -java _G.snippets.java [table]\nContainer for Java-specific snippets.\n -java _m.java [module]\nThe java module. It provides utilities for editing Java code. User tags\nare loaded from _USERHOME/modules/java/tags and user apis are loaded from\n_USERHOME/modules/java/api.\n join_lines _m.textadept.editing.join_lines()\nJoins the current line with the line below.\n keys _G.keys [module]\nManages key commands in Textadept.\n keys _m.textadept.keys [module]\nDefines key commands for Textadept. This set of key commands is pretty\nstandard among other text editors. This module, should be 'require'ed last,\nbut before _m.textadept.menu.\n @@ -1105,45 +1092,44 @@ lexer _G.lexer [module]\nPerforms lexing of Scintilla documents.\n lexer buffer.lexer [number]\nThe lexing language of the document.\n lexers _m.textadept.mime_types.lexers [table]\nList of detected lexers. Lexers are read from `lexers/` and\n`~/.textadept/lexers/`.\n lfs _G.lfs [module]\nLua lfs module.\n -line_copy buffer.line_copy(buffer)\nCopy the line containing the caret.\n@param buffer The focused buffer.\n +line_copy buffer.line_copy(buffer)\nCopy the line containing the caret.\n@param buffer The global buffer.\n line_count buffer.line_count [number]\nThe number of lines in the document. There is always at least one. (Read-only)\n -line_cut buffer.line_cut(buffer)\nCut the line containing the caret.\n@param buffer The focused buffer.\n -line_delete buffer.line_delete(buffer)\nDelete the line containing the caret.\n@param buffer The focused buffer.\n -line_down buffer.line_down(buffer)\nMove caret down one line.\n@param buffer The focused buffer.\n -line_down_extend buffer.line_down_extend(buffer)\nMove caret down one line extending selection to new caret position.\n@param buffer The focused buffer.\n -line_down_rect_extend buffer.line_down_rect_extend(buffer)\nMove caret down one line, extending rectangular selection to new caret\nposition.\n@param buffer The focused buffer.\n -line_duplicate buffer.line_duplicate(buffer)\nDuplicate the current line.\n@param buffer The focused buffer.\n -line_end buffer.line_end(buffer)\nMove caret to last position on line.\n@param buffer The focused buffer.\n -line_end_display buffer.line_end_display(buffer)\nMove caret to last position on display line.\n@param buffer The focused buffer.\n -line_end_display_extend buffer.line_end_display_extend(buffer)\nMove caret to last position on display line extending selection to new\ncaret position.\n@param buffer The focused buffer.\n -line_end_extend buffer.line_end_extend(buffer)\nMove caret to last position on line extending selection to new caret position.\n@param buffer The focused buffer.\n +line_cut buffer.line_cut(buffer)\nCut the line containing the caret.\n@param buffer The global buffer.\n +line_delete buffer.line_delete(buffer)\nDelete the line containing the caret.\n@param buffer The global buffer.\n +line_down buffer.line_down(buffer)\nMove caret down one line.\n@param buffer The global buffer.\n +line_down_extend buffer.line_down_extend(buffer)\nMove caret down one line extending selection to new caret position.\n@param buffer The global buffer.\n +line_down_rect_extend buffer.line_down_rect_extend(buffer)\nMove caret down one line, extending rectangular selection to new caret\nposition.\n@param buffer The global buffer.\n +line_duplicate buffer.line_duplicate(buffer)\nDuplicate the current line.\n@param buffer The global buffer.\n +line_end buffer.line_end(buffer)\nMove caret to last position on line.\n@param buffer The global buffer.\n +line_end_display buffer.line_end_display(buffer)\nMove caret to last position on display line.\n@param buffer The global buffer.\n +line_end_display_extend buffer.line_end_display_extend(buffer)\nMove caret to last position on display line extending selection to new\ncaret position.\n@param buffer The global buffer.\n +line_end_extend buffer.line_end_extend(buffer)\nMove caret to last position on line extending selection to new caret position.\n@param buffer The global buffer.\n line_end_position buffer.line_end_position [table]\nTable of positions after the last visible characters on a line for lines\nstarting from zero. (Read-only)\n -line_end_rect_extend buffer.line_end_rect_extend(buffer)\nMove caret to last position on line, extending rectangular selection to new\ncaret position.\n@param buffer The focused buffer.\n -line_end_wrap buffer.line_end_wrap(buffer)\nMove caret to the end of the display line when word-wrap is enabled. If\nalready there, go to the end of the document line.\n@param buffer The focused buffer.\n -line_end_wrap_extend buffer.line_end_wrap_extend(buffer)\nLike `buffer:line_end_wrap()` but extending selection to new caret position.\n@param buffer The focused buffer.\n -line_from_position buffer.line_from_position(buffer, pos)\nRetrieve the line containing a position.\n@param buffer The focused buffer.\n@param pos The position.\n@return number\n +line_end_rect_extend buffer.line_end_rect_extend(buffer)\nMove caret to last position on line, extending rectangular selection to new\ncaret position.\n@param buffer The global buffer.\n +line_end_wrap buffer.line_end_wrap(buffer)\nMove caret to the end of the display line when word-wrap is enabled. If\nalready there, go to the end of the document line.\n@param buffer The global buffer.\n +line_end_wrap_extend buffer.line_end_wrap_extend(buffer)\nLike `buffer:line_end_wrap()` but extending selection to new caret position.\n@param buffer The global buffer.\n +line_from_position buffer.line_from_position(buffer, pos)\nRetrieve the line containing a position.\n@param buffer The global buffer.\n@param pos The position.\n@return number\n line_indent_position buffer.line_indent_position [table]\nTable of positions before the first non indentation character on a line for\nlines starting from zero. (Read-only)\n line_indentation buffer.line_indentation [table]\nTable of line indentation amounts for lines starting from zero. The indentation\nis measured in character columns, which correspond to the width of space\ncharacters.\n -line_length buffer.line_length(buffer, line)\nReturns how many characters are on a line, including end of line characters. To\nget the length of the line not including any end of line characters, use\n`buffer.line_end_position[line] - buffer:position_from_line(line)`.\n@param buffer The focused buffer.\n@param line The line number.\n@return number\n -line_scroll buffer.line_scroll(buffer, columns, lines)\nScroll horizontally and vertically.\n@param buffer The focused buffer.\n@param columns The number of columns to scroll horizontally.\n@param lines The number of lines to scroll vertically.\n -line_scroll_down buffer.line_scroll_down(buffer)\nScroll the document down, keeping the caret visible.\n@param buffer The focused buffer.\n -line_scroll_up buffer.line_scroll_up(buffer)\nScroll the document up, keeping the caret visible.\n@param buffer The focused buffer.\n +line_length buffer.line_length(buffer, line)\nReturns how many characters are on a line, including end of line characters. To\nget the length of the line not including any end of line characters, use\n`buffer.line_end_position[line] - buffer:position_from_line(line)`.\n@param buffer The global buffer.\n@param line The line number.\n@return number\n +line_scroll buffer.line_scroll(buffer, columns, lines)\nScroll horizontally and vertically.\n@param buffer The global buffer.\n@param columns The number of columns to scroll horizontally.\n@param lines The number of lines to scroll vertically.\n +line_scroll_down buffer.line_scroll_down(buffer)\nScroll the document down, keeping the caret visible.\n@param buffer The global buffer.\n +line_scroll_up buffer.line_scroll_up(buffer)\nScroll the document up, keeping the caret visible.\n@param buffer The global buffer.\n line_state buffer.line_state [table]\nTable of extra styling information for lines starting from zero. As well\nas the 8 bits of lexical state stored for each character there is also an\ninteger stored for each line. This can be used for longer lived parse states.\n -line_transpose buffer.line_transpose(buffer)\nSwitch the current line with the previous.\n@param buffer The focused buffer.\n -line_up buffer.line_up(buffer)\nMove caret up one line.\n@param buffer The focused buffer.\n -line_up_extend buffer.line_up_extend(buffer)\nMove caret up one line extending selection to new caret position.\n@param buffer The focused buffer.\n -line_up_rect_extend buffer.line_up_rect_extend(buffer)\nMove caret up one line, extending rectangular selection to new caret position.\n@param buffer The focused buffer.\n +line_transpose buffer.line_transpose(buffer)\nSwitch the current line with the previous.\n@param buffer The global buffer.\n +line_up buffer.line_up(buffer)\nMove caret up one line.\n@param buffer The global buffer.\n +line_up_extend buffer.line_up_extend(buffer)\nMove caret up one line extending selection to new caret position.\n@param buffer The global buffer.\n +line_up_rect_extend buffer.line_up_rect_extend(buffer)\nMove caret up one line, extending rectangular selection to new caret position.\n@param buffer The global buffer.\n line_visible buffer.line_visible [bool]\nIs a line visible? (Read-only)\n lines file:lines()\nReturns an iterator function that, each time it is called, returns a new\nline from the file. Therefore, the construction for line in file:lines()\ndo *body* end will iterate over all lines of the file. (Unlike `io.lines`,\nthis function does not close the file when the loop ends.)\n lines io.lines([filename])\nOpens the given file name in read mode and returns an iterator function that,\neach time it is called, returns a new line from the file. Therefore, the\nconstruction for line in io.lines(filename) do *body* end will iterate over\nall lines of the file. When the iterator function detects the end of file,\nit returns nil (to finish the loop) and automatically closes the file. The\ncall `io.lines()` (with no file name) is equivalent to `io.input():lines()`;\nthat is, it iterates over the lines of the default input file. In this case\nit does not close the file when the loop ends.\n -lines_join buffer.lines_join(buffer)\nJoin the lines in the target. Where this would lead to no space between words,\nan extra space is inserted.\n@param buffer The focused buffer.\n +lines_join buffer.lines_join(buffer)\nJoin the lines in the target. Where this would lead to no space between words,\nan extra space is inserted.\n@param buffer The global buffer.\n lines_on_screen buffer.lines_on_screen [number]\nThe number of lines completely visible. (Read-only)\n -lines_split buffer.lines_split(buffer, pixel_width)\nSplit the lines in the target into lines that are less wide than pixel_width\nwhere possible.\n@param buffer The focused buffer.\n@param pixel_width The pixel width. When 0, the width of the view is used.\n +lines_split buffer.lines_split(buffer, pixel_width)\nSplit the lines in the target into lines that are less wide than pixel_width\nwhere possible.\n@param buffer The global buffer.\n@param pixel_width The pixel width. When 0, the width of the view is used.\n load _G.load(func [, chunkname])\nLoads a chunk using function `func` to get its pieces. Each call to `func`\nmust return a string that concatenates with previous results. A return of\nan empty string, nil, or no value signals the end of the chunk. If there\nare no errors, returns the compiled chunk as a function; otherwise, returns\nnil plus the error message. The environment of the returned function is the\nglobal environment. `chunkname` is used as the chunk name for error messages\nand debug information. When absent, it defaults to "`=(load)`".\n load _m.textadept.session.load(filename)\nLoads a Textadept session file. Textadept restores split views, opened buffers,\ncursor information, and project manager details.\n@param filename The absolute path to the session file to load. Defaults to\nDEFAULT_SESSION if not specified.\n@usage _m.textadept.session.load(filename)\n@return true if the session file was opened and read; false otherwise.\n load lexer.load(lexer_name)\nInitializes the specified lexer.\n@param lexer_name The name of the lexing language.\n load_ctags _m.textadept.adeptsense.load_ctags(sense, tag_file, nolocations)\nLoads the given ctags file for autocompletion. It is recommended to pass '-n'\nto ctags in order to use line numbers instead of text patterns to locate\ntags. This will greatly reduce memory usage for a large number of symbols\nif nolocations is not true.\n@param sense The adeptsense returned by adeptsense.new().\n@param tag_file The path of the ctags file to load.\n@param nolocations If true, does not store the locations of the tags for\nuse by goto_ctag(). Defaults to false.\n -load_project _m.rails.load_project(utf8_dir)\nSets keys.al.o to snapopen a Rails project. If not directory is provided,\nthe user is prompted for one.\n@param utf8_dir The UTF-8 Rails project directory.\n loaded package.loaded\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.\n loaders package.loaders\nA table used by `require` to control how to load modules. Each entry in\nthis table is a *searcher function*. When looking for a module, `require`\ncalls each of these searchers in ascending order, with the module name\n(the argument given to `require`) as its sole parameter. The function can\nreturn another function (the module *loader*) or a string explaining why it\ndid not find that module (or nil if it has nothing to say). Lua initializes\nthis table with four functions. The first searcher simply looks for a loader\nin the `package.preload` table. The second searcher looks for a loader as a\nLua library, using the path stored at `package.path`. A path is a sequence\nof *templates* separated by semicolons. For each template, the searcher will\nchange each interrogation mark in the template by `filename`, which is the\nmodule name with each dot replaced by a "directory separator" (such as "`/`"\nin Unix); then it will try to open the resulting file name. So, for instance,\nif the Lua path is the string\n "./?.lua;./?.lc;/usr/local/?/init.lua"\nthe search for a Lua file for module `foo` will try to open the files\n`./foo.lua`, `./foo.lc`, and `/usr/local/foo/init.lua`, in that order. The\nthird searcher looks for a loader as a C library, using the path given by\nthe variable `package.cpath`. For instance, if the C path is the string\n "./?.so;./?.dll;/usr/local/?/init.so"\nthe searcher for module `foo` will try to open the files `./foo.so`,\n`./foo.dll`, and `/usr/local/foo/init.so`, in that order. Once it finds\na C library, this searcher first uses a dynamic link facility to link the\napplication with the library. Then it tries to find a C function inside the\nlibrary to be used as the loader. The name of this C function is the string\n"`luaopen_`" concatenated with a copy of the module name where each dot is\nreplaced by an underscore. Moreover, if the module name has a hyphen, its\nprefix up to (and including) the first hyphen is removed. For instance, if the\nmodule name is `a.v1-b.c`, the function name will be `luaopen_b_c`. The fourth\nsearcher tries an *all-in-one loader*. It searches the C path for a library\nfor the root name of the given module. For instance, when requiring `a.b.c`,\nit will search for a C library for `a`. If found, it looks into it for an open\nfunction for the submodule; in our example, that would be `luaopen_a_b_c`. With\nthis facility, a package can pack several C submodules into one single library,\nwith each submodule keeping its original open function.\n loadfile _G.loadfile([filename])\nSimilar to `load`, but gets the chunk from file `filename` or from the\nstandard input, if no file name is given.\n @@ -1159,7 +1145,7 @@ log math.log(x)\nReturns the natural logarithm of `x`.\n log10 math.log10(x)\nReturns the base-10 logarithm of `x`.\n lower lexer.lower\nMatches any lowercase character (`a-z`).\n lower string.lower(s)\nReceives a string and returns a copy of this string with all uppercase\nletters changed to lowercase. All other characters are left unchanged. The\ndefinition of what an uppercase letter is depends on the current locale.\n -lower_case buffer.lower_case(buffer)\nTransform the selection to lower case.\n@param buffer The focused buffer.\n +lower_case buffer.lower_case(buffer)\nTransform the selection to lower case.\n@param buffer The global buffer.\n lpeg _G.lpeg [module]\nLua lpeg module.\n lua _G.keys.lua [table]\nContainer for Lua-specific key commands.\n lua _G.snippets.lua [table]\nContainer for Lua-specific snippets.\n @@ -1168,36 +1154,36 @@ lua gui.find.lua [bool]\nThe search text is interpreted as a Lua pattern.\n lua_pattern_label_text gui.find.lua_pattern_label_text [string]\nThe text of the 'Lua pattern' label. This is primarily used for\nlocalization. (Write-only)\n main_selection buffer.main_selection [number]\nThe main selection. The main selection may be displayed in different colors\nor with a differently styled caret. Only an already existing selection can\nbe made main.\n margin_cursor_n buffer.margin_cursor_n [table]\nTable of cursors shown for margins from zero to four. A reversed arrow cursor\nis normally shown over all margins.\n * `_SCINTILLA.constants.SC_CURSORARROW`: Normal arrow.\n * `_SCINTILLA.constants.SC_CURSORREVERSEARROW`: Reversed arrow.\n\n -margin_get_text buffer.margin_get_text(buffer, line)\nGet the text in the text margin for a line.\n@param buffer The focused buffer.\n@param line The line number.\n@return string\n +margin_get_text buffer.margin_get_text(buffer, line)\nGet the text in the text margin for a line.\n@param buffer The global buffer.\n@param line The line number.\n@return string\n margin_left buffer.margin_left [number]\nThe size in pixels of the left margin. The default is to one pixel.\n margin_mask_n buffer.margin_mask_n [table]\nTable of marker masks for margins from zero to four. A mask determines which\nmarkers are displayed in a margin.\n margin_options buffer.margin_options [number]\nA bit mask of margin options.\n * `_SCINTILLA.constants.SC_MARGINOPTION_NONE` (0): None (default).\n * `_SCINTILLA.constants.SC_MARGINOPTION_SUBLINESELECT` (1): Controls\n how wrapped lines are selected when clicking on margin in front of\n them. If set, only sub line of wrapped line is selected, otherwise\n whole wrapped line is selected.\n\n margin_right buffer.margin_right [number]\nThe size in pixels of the right margin. The default is to one pixel.\n margin_sensitive_n buffer.margin_sensitive_n [table]\nTable of mouse click sensitivity booleans for margins from zero to four. A\nclick in a sensitive margin emits a `margin_click` event. By default, all\nmargins are insensitive.\n -margin_set_text buffer.margin_set_text(buffer, line, text)\nSet the text in the text margin for a line.\n@param buffer The focused buffer.\n@param line The line number.\n@param text The text.\n +margin_set_text buffer.margin_set_text(buffer, line, text)\nSet the text in the text margin for a line.\n@param buffer The global buffer.\n@param line The line number.\n@param text The text.\n margin_style buffer.margin_style [table]\nTable of style numbers for text margin lines starting from zero.\n margin_style_offset buffer.margin_style_offset [number]\nThe start of the range of style numbers used for margin text. Margin styles\nmay be completely separated from standard text styles by setting a style\noffset. For example, setting this to 256 would allow the margin styles to be\nnumbered from 256 upto 511 so they do not overlap styles set by lexers. Each\nstyle number set with `buffer.margin_style` has the offset added before\nlooking up the style.\n -margin_text_clear_all buffer.margin_text_clear_all(buffer)\nClear the margin text on all lines.\n@param buffer The focused buffer.\n +margin_text_clear_all buffer.margin_text_clear_all(buffer)\nClear the margin text on all lines.\n@param buffer The global buffer.\n margin_type_n buffer.margin_type_n [table]\nTable of margin types for margins from zero to four.\n * `_SCINTILLA.constants.SC_MARGIN_SYMBOL` (0): A symbol margin.\n * `_SCINTILLA.constants.SC_MARGIN_NUMBER` (1): A line number margin.\n * `_SCINTILLA.constants.SC_MARGIN_BACK` (2): A symbol margin that sets\n its background color to match the default text background color.\n * `_SCINTILLA.constants.SC_MARGIN_FORE` (3): A symbol margin that sets\n its background color to match the default text foreground color.\n * `_SCINTILLA.constants.SC_MARGIN_TEXT` (4): A text margin.\n * `_SCINTILLA.constants.SC_MARGIN_RTEXT` (5): A right justified text\n margin.\n\n margin_width_n buffer.margin_width_n [table]\nTable of margin widths expressed in pixes for margins from zero to four.\n -marker_add buffer.marker_add(buffer, line, marker_num)\nAdd a marker to a line, returning an ID which can be used to find or delete\nthe marker. Returns -1 if this fails (illegal line number, out of memory).\n@param buffer The focused buffer.\n@param line The line number.\n@param marker_num A marker number in the range of 0 to 31.\n@return number\n -marker_add_set buffer.marker_add_set(buffer, line, marker_mask)\nAdd a set of markers to a line.\n@param buffer The focused buffer.\n@param line The line number.\n@param marker_mask A mask of markers to set. Set bit 0 to set marker 0,\nbit 1 for marker 1 and so on.\n -marker_define buffer.marker_define(buffer, marker_num, marker_symbol)\nSet the symbol used for a particular marker number.\n@param buffer The focused buffer.\n@param marker_num A marker number in the range of 0 to 31.\n@param marker_symbol A marker symbol: _SCINTILLA.constants.SC_MARK_*.\n@see _SCINTILLA.next_marker_number\n -marker_define_pixmap buffer.marker_define_pixmap(buffer, marker_num, pixmap)\nDefine a marker from a pixmap.\n@param buffer The focused buffer.\n@param marker_num A marker number in the range of 0 to 31.\n@param pixmap Null-terminated pixmap data.\n -marker_define_rgba_image buffer.marker_define_rgba_image(buffer, marker_num, pixels)\nDefine a marker from RGBA data. It has the width and height from\n`buffer.rgba_image_width` and `buffer.rgba_image_height`.\n@param buffer The focused buffer.\n@param marker_num A marker number in the range of 0 to 31.\n@param pixels A sequence of 4 byte pixel values starting with the pixels\nfor the top line, with the leftmost pixel first, then continuing with the\npixels for subsequent lines. There is no gap between lines for alignment\nreasons. Each pixel consists of, in order, a red byte, a green byte, a blue\nbyte and an alpha byte. The colour bytes are not premultiplied by the alpha\nvalue. That is, a fully red pixel that is 25% opaque will be [FF, 00, 00, 3F].\n -marker_delete buffer.marker_delete(buffer, line, marker_num)\nDelete a marker from a line.\n@param buffer The focused buffer.\n@param line The line number.\n@param marker_num A marker number in the range of 0 to 31 or -1 to delete\nall markers from the line.\n -marker_delete_all buffer.marker_delete_all(buffer, marker_num)\nDelete all markers with a particular number from all lines.\n@param buffer The focused buffer.\n@param marker_num A marker number in the range of 0 to 31 or -1 to delete\nall markers from all lines.\n -marker_delete_handle buffer.marker_delete_handle(buffer, handle)\nDelete a marker.\n@param buffer The focused buffer.\n@param handle The identifier of a marker returned by buffer:marker_add().\n -marker_enable_highlight buffer.marker_enable_highlight(buffer, enabled)\nEnable/disable highlight for current folding block (smallest one that contains\nthe caret)\n@param buffer The focused buffer.\n -marker_get buffer.marker_get(buffer, line)\nGet a bit mask of all the markers set on a line. Bit 0 is set if marker 0\nis present, bit 1 for marker 1 and so on.\n@param buffer The focused buffer.\n@param line The line number.\n@return number.\n -marker_line_from_handle buffer.marker_line_from_handle(buffer, handle)\nRetrieve the line number at which a particular marker is located. Returns\n-1 if it not found.\n@param buffer The focused buffer.\n@param handle The identifier of a marker returned by buffer:marker_add().\n@return number\n -marker_next buffer.marker_next(buffer, start_line, marker_mask)\nFind the next line at or after start_line that includes a marker in\nmask. Return -1 when no more lines.\n@param buffer The focused buffer.\n@param start_line The start line.\n@param marker_mask A mask of markers to find. Set bit 0 to find marker 0,\nbit 1 for marker 1 and so on.\n@return number\n -marker_previous buffer.marker_previous(buffer, start_line, marker_mask)\nFind the previous line before lineStart that includes a marker in mask.\n@param buffer The focused buffer.\n@param start_line The start line.\n@param marker_mask A mask of markers to find. Set bit 0 to find marker 0,\nbit 1 for marker 1 and so on.\n@return number\n -marker_set_alpha buffer.marker_set_alpha(buffer, marker_num, alpha)\nSet the alpha used for a marker that is drawn in the text area, not the margin.\n@param buffer The focused buffer.\n@param marker_num A marker number in the range of 0 to 31.\n@param alpha An alpha value between 0 (transparent) and 255 (opaque), or\n256 for no alpha.\n -marker_set_back buffer.marker_set_back(buffer, marker_num, color)\nSet the background color used for a particular marker number.\n@param buffer The focused buffer.\n@param marker_num A marker number in the range of 0 to 31.\n@param color A color in 0xBBGGRR format.\n -marker_set_back_selected buffer.marker_set_back_selected(buffer, marker_num, color)\nSet the background color used for a particular marker number when its folding\nblock is selected.\n@param buffer The focused buffer.\n@param marker_num A marker number in the range of 0 to 31.\n@param color A color in 0xBBGGRR format. The default color is #FF0000.\n -marker_set_fore buffer.marker_set_fore(buffer, marker_num, color)\nSet the foreground color used for a particular marker number.\n@param buffer The focused buffer.\n@param marker_num A marker number in the range of 0 to 31.\n@param color A color in 0xBBGGRR format.\n -marker_symbol_defined buffer.marker_symbol_defined(buffer, marker_num)\nReturn the symbol defined for marker_num with `buffer:marker_define()`.\n@param buffer The focused buffer.\n@param marker_num A marker number in the range of 0 to 31.\n@return number\n +marker_add buffer.marker_add(buffer, line, marker_num)\nAdd a marker to a line, returning an ID which can be used to find or delete\nthe marker. Returns -1 if this fails (illegal line number, out of memory).\n@param buffer The global buffer.\n@param line The line number.\n@param marker_num A marker number in the range of 0 to 31.\n@return number\n +marker_add_set buffer.marker_add_set(buffer, line, marker_mask)\nAdd a set of markers to a line.\n@param buffer The global buffer.\n@param line The line number.\n@param marker_mask A mask of markers to set. Set bit 0 to set marker 0,\nbit 1 for marker 1 and so on.\n +marker_define buffer.marker_define(buffer, marker_num, marker_symbol)\nSet the symbol used for a particular marker number.\n@param buffer The global buffer.\n@param marker_num A marker number in the range of 0 to 31.\n@param marker_symbol A marker symbol: _SCINTILLA.constants.SC_MARK_*.\n@see _SCINTILLA.next_marker_number\n +marker_define_pixmap buffer.marker_define_pixmap(buffer, marker_num, pixmap)\nDefine a marker from a pixmap.\n@param buffer The global buffer.\n@param marker_num A marker number in the range of 0 to 31.\n@param pixmap Null-terminated pixmap data.\n +marker_define_rgba_image buffer.marker_define_rgba_image(buffer, marker_num, pixels)\nDefine a marker from RGBA data. It has the width and height from\n`buffer.rgba_image_width` and `buffer.rgba_image_height`.\n@param buffer The global buffer.\n@param marker_num A marker number in the range of 0 to 31.\n@param pixels A sequence of 4 byte pixel values starting with the pixels\nfor the top line, with the leftmost pixel first, then continuing with the\npixels for subsequent lines. There is no gap between lines for alignment\nreasons. Each pixel consists of, in order, a red byte, a green byte, a blue\nbyte and an alpha byte. The colour bytes are not premultiplied by the alpha\nvalue. That is, a fully red pixel that is 25% opaque will be [FF, 00, 00, 3F].\n +marker_delete buffer.marker_delete(buffer, line, marker_num)\nDelete a marker from a line.\n@param buffer The global buffer.\n@param line The line number.\n@param marker_num A marker number in the range of 0 to 31 or -1 to delete\nall markers from the line.\n +marker_delete_all buffer.marker_delete_all(buffer, marker_num)\nDelete all markers with a particular number from all lines.\n@param buffer The global buffer.\n@param marker_num A marker number in the range of 0 to 31 or -1 to delete\nall markers from all lines.\n +marker_delete_handle buffer.marker_delete_handle(buffer, handle)\nDelete a marker.\n@param buffer The global buffer.\n@param handle The identifier of a marker returned by buffer:marker_add().\n +marker_enable_highlight buffer.marker_enable_highlight(buffer, enabled)\nEnable/disable highlight for current folding block (smallest one that contains\nthe caret)\n@param buffer The global buffer.\n +marker_get buffer.marker_get(buffer, line)\nGet a bit mask of all the markers set on a line. Bit 0 is set if marker 0\nis present, bit 1 for marker 1 and so on.\n@param buffer The global buffer.\n@param line The line number.\n@return number.\n +marker_line_from_handle buffer.marker_line_from_handle(buffer, handle)\nRetrieve the line number at which a particular marker is located. Returns\n-1 if it not found.\n@param buffer The global buffer.\n@param handle The identifier of a marker returned by buffer:marker_add().\n@return number\n +marker_next buffer.marker_next(buffer, start_line, marker_mask)\nFind the next line at or after start_line that includes a marker in\nmask. Return -1 when no more lines.\n@param buffer The global buffer.\n@param start_line The start line.\n@param marker_mask A mask of markers to find. Set bit 0 to find marker 0,\nbit 1 for marker 1 and so on.\n@return number\n +marker_previous buffer.marker_previous(buffer, start_line, marker_mask)\nFind the previous line before lineStart that includes a marker in mask.\n@param buffer The global buffer.\n@param start_line The start line.\n@param marker_mask A mask of markers to find. Set bit 0 to find marker 0,\nbit 1 for marker 1 and so on.\n@return number\n +marker_set_alpha buffer.marker_set_alpha(buffer, marker_num, alpha)\nSet the alpha used for a marker that is drawn in the text area, not the margin.\n@param buffer The global buffer.\n@param marker_num A marker number in the range of 0 to 31.\n@param alpha An alpha value between 0 (transparent) and 255 (opaque), or\n256 for no alpha.\n +marker_set_back buffer.marker_set_back(buffer, marker_num, color)\nSet the background color used for a particular marker number.\n@param buffer The global buffer.\n@param marker_num A marker number in the range of 0 to 31.\n@param color A color in 0xBBGGRR format.\n +marker_set_back_selected buffer.marker_set_back_selected(buffer, marker_num, color)\nSet the background color used for a particular marker number when its folding\nblock is selected.\n@param buffer The global buffer.\n@param marker_num A marker number in the range of 0 to 31.\n@param color A color in 0xBBGGRR format. The default color is #FF0000.\n +marker_set_fore buffer.marker_set_fore(buffer, marker_num, color)\nSet the foreground color used for a particular marker number.\n@param buffer The global buffer.\n@param marker_num A marker number in the range of 0 to 31.\n@param color A color in 0xBBGGRR format.\n +marker_symbol_defined buffer.marker_symbol_defined(buffer, marker_num)\nReturn the symbol defined for marker_num with `buffer:marker_define()`.\n@param buffer The global buffer.\n@param marker_num A marker number in the range of 0 to 31.\n@return number\n match lpeg.match(pattern, subject [, init])\nThe matching function. It attempts to match the given pattern against the\nsubject string. If the match succeeds, returns the index in the subject of\nthe first character after the match, or the captured values (if the pattern\ncaptured any value). An optional numeric argument init makes the match starts\nat that position in the subject string. As usual in Lua libraries, a negative\nvalue counts from the end. Unlike typical pattern-matching functions, match\nworks only in anchored mode; that is, it tries to match the pattern with a\nprefix of the given subject string (at position init), not with an arbitrary\nsubstring of the subject. So, if we want to find a pattern anywhere in a\nstring, we must either write a loop in Lua or write a pattern that matches\nanywhere. This second approach is easy and quite efficient; see examples.\n match string.match(s, pattern [, init])\nLooks for the first *match* of `pattern` in the string `s`. If it finds one,\nthen `match` returns the captures from the pattern; otherwise it returns\nnil. If `pattern` specifies no captures, then the whole match is returned. A\nthird, optional numerical argument `init` specifies where to start the search;\nits default value is 1 and can be negative.\n match_brace _m.textadept.editing.match_brace(select)\nGoes to a matching brace position, selecting the text inside if specified.\n@param select If true, selects the text between matching braces.\n @@ -1218,15 +1204,15 @@ modify buffer.modify [bool]\nWhether the document is different from when it was module _G.module(name [, ···])\nCreates a module. If there is a table in `package.loaded[name]`, this table is\nthe module. Otherwise, if there is a global table `t` with the given name, this\ntable is the module. Otherwise creates a new table `t` and sets it as the value\nof the global `name` and the value of `package.loaded[name]`. This function\nalso initializes `t._NAME` with the given name, `t._M` with the module (`t`\nitself), and `t._PACKAGE` with the package name (the full module name minus\nlast component; see below). Finally, `module` sets `t` as the new environment\nof the current function and the new value of `package.loaded[name]`, so\nthat `require` returns `t`. If `name` is a compound name (that is, one\nwith components separated by dots), `module` creates (or reuses, if they\nalready exist) tables for each component. For instance, if `name` is `a.b.c`,\nthen `module` stores the module table in field `c` of field `b` of global\n`a`. This function can receive optional *options* after the module name,\nwhere each option is a function to be applied over the module.\n mouse_down_captures buffer.mouse_down_captures [bool]\nWhether the mouse is captured when its button is pressed.\n mouse_dwell_time buffer.mouse_dwell_time [number]\nThe time the mouse must sit still to generate a mouse dwell event. If set\nto `_SCINTILLA.constants.SC_TIME_FOREVER`, the default, no dwell events\nare generated.\n -move_caret_inside_view buffer.move_caret_inside_view(buffer)\nMove the caret inside current view if it's not there already. Any selection\nis lost.\n@param buffer The focused buffer.\n -move_selected_lines_down buffer.move_selected_lines_down(buffer)\nMove the selected lines down one line, shifting the line below before the\nselection. The selection will be automatically extended to the beginning\nof the selection's first line and the end of the seletion's last line. If\nnothing was selected, the line the cursor is currently at will be selected.\n@param buffer The focused buffer.\n -move_selected_lines_up buffer.move_selected_lines_up(buffer)\nMove the selected lines up one line, shifting the line above after the\nselection. The selection will be automatically extended to the beginning\nof the selection's first line and the end of the seletion's last line. If\nnothing was selected, the line the cursor is currently at will be selected.\n@param buffer The focused buffer.\n +move_caret_inside_view buffer.move_caret_inside_view(buffer)\nMove the caret inside current view if it's not there already. Any selection\nis lost.\n@param buffer The global buffer.\n +move_selected_lines_down buffer.move_selected_lines_down(buffer)\nMove the selected lines down one line, shifting the line below before the\nselection. The selection will be automatically extended to the beginning\nof the selection's first line and the end of the seletion's last line. If\nnothing was selected, the line the cursor is currently at will be selected.\n@param buffer The global buffer.\n +move_selected_lines_up buffer.move_selected_lines_up(buffer)\nMove the selected lines up one line, shifting the line above after the\nselection. The selection will be automatically extended to the beginning\nof the selection's first line and the end of the seletion's last line. If\nnothing was selected, the line the cursor is currently at will be selected.\n@param buffer The global buffer.\n multi_paste buffer.multi_paste [bool]\nThe effect of pasting when there are multiple selections.\n * `_SCINTILLA.constants.SC_MULTIPASTE_ONCE` (0): Pasted text can go\n into just the main selection (default).\n * `_SCINTILLA.constants.SC_MULTIPASTE_EACH` (1): Pasted text can go\n into each selection.\n\n multiple_selection buffer.multiple_selection [bool]\nWhether multiple selections can be made. When multiple selection is disabled,\nit is not possible to select multiple ranges by holding down the Ctrl key\nwhile dragging with the mouse.\n nested_pair lexer.nested_pair(start_chars, end_chars, end_optional)\nSimilar to `delimited_range()`, but allows for multi-character\ndelimitters. This is useful for lexers with tokens such as nested block\ncomments. With single-character delimiters, this function is identical to\n`delimited_range(start_chars..end_chars, nil, end_optional, true)`.\n@param start_chars The string starting a nested sequence.\n@param end_chars The string ending a nested sequence.\n@param end_optional Optional flag indicating whether or not an ending delimiter\nis optional or not. If true, the range begun by the start delimiter matches\nuntil an end delimiter or the end of the input is reached.\n@usage local nested_comment = l.nested_pair('/*', '*/', true)\n new _m.textadept.adeptsense.new(lang)\nCreates a new adeptsense for the given lexer language. Only one sense can\nexist per language.\n@param lang The lexer language to create an adeptsense for.\n@usage local lua_sense = _m.textadept.adeptsense.new('lua')\n@return adeptsense.\n new_buffer _G.new_buffer()\nCreates a new buffer. Activates the 'buffer_new' signal.\n@return the new buffer.\n -new_line buffer.new_line(buffer)\nInsert a new line, may use a CRLF, CR or LF depending on EOL mode.\n@param buffer The focused buffer.\n +new_line buffer.new_line(buffer)\nInsert a new line, may use a CRLF, CR or LF depending on EOL mode.\n@param buffer The global buffer.\n newline lexer.newline\nMatches any newline characters.\n next _G.next(table [, index])\nAllows a program to traverse all fields of a table. Its first argument is\na table and its second argument is an index in this table. `next` returns\nthe next index of the table and its associated value. When called with nil\nas its second argument, `next` returns an initial index and its associated\nvalue. When called with the last index, or with nil in an empty table,\n`next` returns nil. If the second argument is absent, then it is interpreted\nas nil. In particular, you can use `next(t)` to check whether a table is\nempty. The order in which the indices are enumerated is not specified, *even\nfor numeric indices*. (To traverse a table in numeric order, use a numerical\nfor or the `ipairs` function.) The behavior of `next` is *undefined* if,\nduring the traversal, you assign any value to a non-existent field in the\ntable. You may however modify existing fields. In particular, you may clear\nexisting fields.\n next_indic_number _SCINTILLA.next_indic_number()\nReturns a unique indicator number. Use this function for custom indicators\nin order to prevent clashes with identifiers of other custom indicators.\n@usage local indic_num = _SCINTILLA.next_indic_number()\n@see buffer.indic_style\n @@ -1234,7 +1220,6 @@ next_marker_number _SCINTILLA.next_marker_number()\nReturns a unique marker numb next_user_list_type _SCINTILLA.next_user_list_type()\nReturns a unique user list type. Use this function for custom user lists in\norder to prevent clashes with type identifiers of other custom user lists.\n@usage local list_type = _SCINTILLA.next_user_list_type()\n@see buffer.user_list_show\n nonnewline lexer.nonnewline\nMatches any non-newline character.\n nonnewline_esc lexer.nonnewline_esc\nMatches any non-newline character excluding newlines escaped with `\\`.\n -notification events.notification(n)\nHandles Scintilla notifications.\n@param n The Scintilla notification structure as a Lua table.\n@return true or false if any handler explicitly returned such; nil otherwise.\n oct_num lexer.oct_num\nMatches an octal number.\n open _m.textadept.snapopen.open(utf8_paths, filter, exclusive, depth)\nQuickly open a file in set of directories.\n@param utf8_paths A UTF-8 string directory path or table of UTF-8 directory\npaths to search.\n@param filter A filter for files and folders to exclude. The filter may be\na string or table. Each filter is a Lua pattern. Any files matching a filter\nare excluded. Prefix a pattern with '!' to exclude any files that do not match\nthe filter. Directories can be excluded by adding filters to a table assigned\nto a 'folders' key in the filter table. All strings should be UTF-8 encoded.\n@param exclusive Flag indicating whether or not to exclude PATHS in the\nsearch. Defaults to false.\n@param depth Number of directories to recurse into for finding files. Defaults\nto DEFAULT_DEPTH.\n@usage _m.textadept.snapopen.open()\n@usage _m.textadept.snapopen.open(buffer.filename:match('^.+/'), nil, true)\n@usage _m.textadept.snapopen.open(nil, '!%.lua$')\n@usage _m.textadept.snapopen.open(nil, { folders = { '%.hg' } })\n 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\nmessage. The `mode` string can be any of the following: "r": read mode (the\ndefault); "w": write mode; "a": append mode; "r+": update mode, all previous\ndata is preserved; "w+": update mode, all previous data is erased; "a+":\nappend update mode, previous data is preserved, writing is only allowed at\nthe end of file. The `mode` string can also have a '`b`' at the end, which\nis needed in some systems to open the file in binary mode. This string is\nexactly what is used in the standard C function `fopen`.\n @@ -1245,34 +1230,31 @@ os _G.os [module]\nLua os module.\n output io.output([file])\nSimilar to `io.input`, but operates over the default output file.\n overtype buffer.overtype [bool]\nOvertype mode.\n package _G.package [module]\nLua package module.\n -page_down buffer.page_down(buffer)\nMove caret one page down.\n@param buffer The focused buffer.\n -page_down_extend buffer.page_down_extend(buffer)\nMove caret one page down extending selection to new caret position.\n@param buffer The focused buffer.\n -page_down_rect_extend buffer.page_down_rect_extend(buffer)\nMove caret one page down, extending rectangular selection to new caret\nposition.\n@param buffer The focused buffer.\n -page_up buffer.page_up(buffer)\nMove caret one page up.\n@param buffer The focused buffer.\n -page_up_extend buffer.page_up_extend(buffer)\nMove caret one page up extending selection to new caret position.\n@param buffer The focused buffer.\n -page_up_rect_extend buffer.page_up_rect_extend(buffer)\nMove caret one page up, extending rectangular selection to new caret position.\n@param buffer The focused buffer.\n +page_down buffer.page_down(buffer)\nMove caret one page down.\n@param buffer The global buffer.\n +page_down_extend buffer.page_down_extend(buffer)\nMove caret one page down extending selection to new caret position.\n@param buffer The global buffer.\n +page_down_rect_extend buffer.page_down_rect_extend(buffer)\nMove caret one page down, extending rectangular selection to new caret\nposition.\n@param buffer The global buffer.\n +page_up buffer.page_up(buffer)\nMove caret one page up.\n@param buffer The global buffer.\n +page_up_extend buffer.page_up_extend(buffer)\nMove caret one page up extending selection to new caret position.\n@param buffer The global buffer.\n +page_up_rect_extend buffer.page_up_rect_extend(buffer)\nMove caret one page up, extending rectangular selection to new caret position.\n@param buffer The global buffer.\n pairs _G.pairs(t)\nReturns three values: the `next` function, the table `t`, and nil, so that\nthe construction for k,v in pairs(t) do *body* end will iterate over all\nkey–value pairs of table `t`. See function `next` for the caveats of\nmodifying the table during its traversal.\n -para_down buffer.para_down(buffer)\nMove caret one paragraph down (delimited by empty lines).\n@param buffer The focused buffer.\n -para_down_extend buffer.para_down_extend(buffer)\nMove caret one paragraph down (delimited by empty lines) extending selection\nto new caret position.\n@param buffer The focused buffer.\n -para_up buffer.para_up(buffer)\nMove caret one paragraph up (delimited by empty lines).\n@param buffer The focused buffer.\n -para_up_extend buffer.para_up_extend(buffer)\nMove caret one paragraph up (delimited by empty lines) extending selection\nto new caret position.\n@param buffer The focused buffer.\n -paste buffer.paste(buffer)\nPaste the contents of the clipboard into the document replacing the selection.\n@param buffer The focused buffer.\n +para_down buffer.para_down(buffer)\nMove caret one paragraph down (delimited by empty lines).\n@param buffer The global buffer.\n +para_down_extend buffer.para_down_extend(buffer)\nMove caret one paragraph down (delimited by empty lines) extending selection\nto new caret position.\n@param buffer The global buffer.\n +para_up buffer.para_up(buffer)\nMove caret one paragraph up (delimited by empty lines).\n@param buffer The global buffer.\n +para_up_extend buffer.para_up_extend(buffer)\nMove caret one paragraph up (delimited by empty lines) extending selection\nto new caret position.\n@param buffer The global buffer.\n +paste buffer.paste(buffer)\nPaste the contents of the clipboard into the document replacing the selection.\n@param buffer The global buffer.\n path package.path\nThe path used by `require` to search for a Lua loader. At start-up,\nLua initializes this variable with the value of the environment variable\n`LUA_PATH` or with a default path defined in `luaconf.h`, if the environment\nvariable is not defined. Any "`;;`" in the value of the environment variable\nis replaced by the default path.\n patterns _m.textadept.mime_types.patterns [table]\nFirst-line patterns and their associated lexers.\n pcall _G.pcall(f, arg1, ···)\nCalls function `f` with the given arguments in *protected mode*. This means\nthat any error inside `f` is not propagated; instead, `pcall` catches the\nerror 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.\n -php _G.keys.php [table]\nContainer for PHP-specific key commands.\n -php _G.snippets.php [table]\nContainer for PHP-specific snippets.\n -php _m.php [module]\nThe php module. It provides utilities for editing PHP code. User tags\nare loaded from _USERHOME/modules/php/tags and user apis are loaded from\n_USERHOME/modules/php/api.\n pi math.pi\nThe value of *pi*.\n -point_x_from_position buffer.point_x_from_position(buffer, pos)\nRetrieve the x value of the point in the window where a position is displayed.\n@param buffer The focused buffer.\n@param pos The position.\n@return number\n -point_y_from_position buffer.point_y_from_position(buffer, pos)\nRetrieve the y value of the point in the window where a position is displayed.\n@param buffer The focused buffer.\n@param pos The position.\n@return number\n +point_x_from_position buffer.point_x_from_position(buffer, pos)\nRetrieve the x value of the point in the window where a position is displayed.\n@param buffer The global buffer.\n@param pos The position.\n@return number\n +point_y_from_position buffer.point_y_from_position(buffer, pos)\nRetrieve the y value of the point in the window where a position is displayed.\n@param buffer The global buffer.\n@param pos The position.\n@return number\n popen io.popen(prog [, mode])\nStarts program `prog` in a separated process and returns a file handle that\nyou can use to read data from this program (if `mode` is `"r"`, the default)\nor to write data to this program (if `mode` is `"w"`). This function is\nsystem dependent and is not available on all platforms.\n -position_after buffer.position_after(buffer, pos)\nGiven a valid document position, return the next position taking code page\ninto account. Maximum value returned is the last position in the document.\n@param buffer The focused buffer.\n@param pos The position.\n -position_before buffer.position_before(buffer, pos)\nGiven a valid document position, return the previous position taking code\npage into account. Returns 0 if passed 0.\n@param buffer The focused buffer.\n@param pos The position.\n@return number\n +position_after buffer.position_after(buffer, pos)\nGiven a valid document position, return the next position taking code page\ninto account. Maximum value returned is the last position in the document.\n@param buffer The global buffer.\n@param pos The position.\n +position_before buffer.position_before(buffer, pos)\nGiven a valid document position, return the previous position taking code\npage into account. Returns 0 if passed 0.\n@param buffer The global buffer.\n@param pos The position.\n@return number\n position_cache buffer.position_cache [number]\nThe number of entries in the position cache. The position cache stores\nposition information for short runs of text so that their layout can be\ndetermined more quickly if the run recurs.\n -position_from_line buffer.position_from_line(buffer, line)\nRetrieve the position at the start of a line. If line is greater than the\nlines in the document, returns -1.\n@param buffer The focused buffer.\n@param line The line.\n@return number\n -position_from_point buffer.position_from_point(buffer, x, y)\nFind the position from a point within the window.\n@param buffer The focused buffer.\n@return number\n -position_from_point_close buffer.position_from_point_close(buffer, x, y)\nReturns the position from a point within the window, but return -1 if not\nclose to text.\n@param buffer The focused buffer.\n@return number\n +position_from_line buffer.position_from_line(buffer, line)\nRetrieve the position at the start of a line. If line is greater than the\nlines in the document, returns -1.\n@param buffer The global buffer.\n@param line The line.\n@return number\n +position_from_point buffer.position_from_point(buffer, x, y)\nFind the position from a point within the window.\n@param buffer The global buffer.\n@return number\n +position_from_point_close buffer.position_from_point_close(buffer, x, y)\nReturns the position from a point within the window, but return -1 if not\nclose to text.\n@param buffer The global buffer.\n@return number\n pow math.pow(x, y)\nReturns *x^y*. (You can also use the expression `x^y` to compute this value.)\n preload package.preload\nA table to store loaders for specific modules (see `require`).\n prepare_for_save _m.textadept.editing.prepare_for_save()\nPrepares the buffer for saving to a file. Strips trailing whitespace off of\nevery line, ensures an ending newline, and converts non-consistent EOLs.\n @@ -1282,7 +1264,7 @@ print lexer.print\nMatches any printable character (space to `~`).\n print_colour_mode buffer.print_colour_mode [number]\nThe print color mode.\n * `_SCINTILLA.constants.SC_PRINT_NORMAL` (0): Print using the current\n screen colors. This is the default.\n * `_SCINTILLA.constants.SC_PRINT_INVERTLIGHT` (1): If you use a dark\n screen background this saves ink by inverting the light value of all\n colors and printing on a white background.\n * `_SCINTILLA.constants.SC_PRINT_BLACKONWHITE` (2): Print all text as\n black on a white background.\n * `_SCINTILLA.constants.SC_PRINT_COLOURONWHITE` (3): Everything prints\n in its own color on a white background.\n * `_SCINTILLA.constants.SC_PRINT_COLOURONWHITEDEFAULTBG` (4):\n Everything prints in its own color on a white background except that\n line numbers use their own background color.\n\n print_magnification buffer.print_magnification [number]\nThe print magnification added to the point size of each style for printing.\n print_wrap_mode buffer.print_wrap_mode [number]\nPrinting line wrap mode.\n * `_SCINTILLA.constants.SC_WRAP_NONE` (0): Each line of text generates\n one line of output and the line is truncated if it is too long to fit\n into the print area.\n * `_SCINTILLA.constants.SC_WRAP_WORD` (1): Wraps printed output so that\n all characters fit into the print rectangle. Tries to wrap only\n between words as indicated by white space or style changes although\n if a word is longer than a line, it will be wrapped before the line\n end. This is the default.\n * `_SCINTILLA.constants.SC_WRAP_CHAR` (2).\n\n -private_lexer_call buffer.private_lexer_call(buffer, operation, data)\nFor private communication between an application and a known lexer.\n@param buffer The focused buffer.\n@param operation An operation number.\n@param data Number data.\n +private_lexer_call buffer.private_lexer_call(buffer, operation, data)\nFor private communication between an application and a known lexer.\n@param buffer The global buffer.\n@param operation An operation number.\n@param data Number data.\n process args.process()\nProcesses command line arguments. Add command line switches with\nargs.register(). Any unrecognized arguments are treated as filepaths and\nopened. Generates an 'arg_none' event when no args are present.\n@see register\n prompt_load _m.textadept.session.prompt_load()\nPrompts the user for a Textadept session to load.\n prompt_save _m.textadept.session.prompt_save()\nPrompts the user to save the current Textadept session to a file.\n @@ -1293,9 +1275,6 @@ punct lexer.punct\nMatches any punctuation character not alphanumeric (`!` to `/ purple lexer.colors.purple\nPurple.\n quit _G.quit()\nQuits Textadept.\n rad math.rad(x)\nReturns the angle `x` (given in degrees) in radians.\n -rails _G.keys.rails [table]\nContainer for Rails-specific key commands.\n -rails _G.snippets.rails [table]\nContainer for Rails-specific snippets.\n -rails _m.rails [module]\nThe rails module. It provides utilities for editing Ruby on Rails code. User\ntags are loaded from _USERHOME/modules/rails/tags and user apis are loaded\nfrom _USERHOME/modules/rails/api.\n random math.random([m [, n]])\nThis function is an interface to the simple pseudo-random generator function\n`rand` provided by ANSI C. (No guarantees can be given for its statistical\nproperties.) When called without arguments, returns a uniform pseudo-random\nreal number in the range *[0,1)*. When called with an integer number `m`,\n`math.random` returns a uniform pseudo-random integer in the range *[1,\nm]*. When called with two integer numbers `m` and `n`, `math.random` returns\na uniform pseudo-random integer in the range *[m, n]*.\n randomseed math.randomseed(x)\nSets `x` as the "seed" for the pseudo-random generator: equal seeds produce\nequal sequences of numbers.\n rawequal _G.rawequal(v1, v2)\nChecks whether `v1` is equal to `v2`, without invoking any metamethod. Returns\na boolean.\n @@ -1312,11 +1291,11 @@ rectangular_selection_caret buffer.rectangular_selection_caret [number]\nThe pos rectangular_selection_caret_virtual_space buffer.rectangular_selection_caret_virtual_space [number]\nThe amount of virtual space for the caret of the rectangular selection.\n rectangular_selection_modifier buffer.rectangular_selection_modifier [number]\nThe modifier key used to indicate that a rectangular selection should be\ncreated when combined with a mouse drag.\n * `_SCINTILLA.constants.SCMOD_CTRL` (2): Control key (default).\n * `_SCINTILLA.constants.SCMOD_ALT` (4): Alt key.\n * `_SCINTILLA.constants.SCMOD_SUPER` (8): Left Windows key on a Windows\n keyboard or the Command key on a Mac.\n\n red lexer.colors.red\nRed.\n -redo buffer.redo(buffer)\nRedoes the next action on the undo history.\n@param buffer The focused buffer.\n +redo buffer.redo(buffer)\nRedoes the next action on the undo history.\n@param buffer The global buffer.\n register args.register(switch1, switch2, narg, f, description)\nRegisters a command line switch.\n@param switch1 String switch (short version).\n@param switch2 String switch (long version).\n@param narg The number of expected parameters for the switch.\n@param f The Lua function to run when the switch is tripped.\n@param description Description of the switch.\n -register_image buffer.register_image(buffer, type, xpm_data)\nRegister an XPM image for use in autocompletion lists.\n@param buffer The focused buffer.\n@param type Integer type to register the image with.\n@param xpm_data XPM data as is described for buffer:marker_define_pixmap().\n -register_rgba_image buffer.register_rgba_image(buffer, type, pixels)\nRegister an RGBA image for use in autocompletion lists. It has the width\nand height from `buffer.rgba_image_width` and `buffer.rgba_image_height`.\n@param buffer The focused buffer.\n@param type Integer type to register the image with.\n@param pixels RGBA data as is described for buffer:marker_define_rgba_image().\n -reload buffer.reload(buffer)\nReloads the file in a given buffer.\n@param buffer The focused buffer.\n +register_image buffer.register_image(buffer, type, xpm_data)\nRegister an XPM image for use in autocompletion lists.\n@param buffer The global buffer.\n@param type Integer type to register the image with.\n@param xpm_data XPM data as is described for buffer:marker_define_pixmap().\n +register_rgba_image buffer.register_rgba_image(buffer, type, pixels)\nRegister an RGBA image for use in autocompletion lists. It has the width\nand height from `buffer.rgba_image_width` and `buffer.rgba_image_height`.\n@param buffer The global buffer.\n@param type Integer type to register the image with.\n@param pixels RGBA data as is described for buffer:marker_define_rgba_image().\n +reload buffer.reload(buffer)\nReloads the file in a given buffer.\n@param buffer The global buffer.\n remove _m.textadept.bookmarks.remove()\nClears the bookmark at the current line.\n remove os.remove(filename)\nDeletes the file or directory with the given name. Directories must be\nempty to be removed. If this function fails, it returns nil, plus a string\ndescribing the error.\n remove table.remove(table [, pos])\nRemoves from `table` the element at position `pos`, shifting down other\nelements to close the space, if necessary. Returns the value of the removed\nelement. The default value for `pos` is `n`, where `n` is the length of the\ntable, so that a call `table.remove(t)` removes the last element of table `t`.\n @@ -1328,47 +1307,41 @@ replace_all_button_text gui.find.replace_all_button_text [string]\nThe text of t replace_button_text gui.find.replace_button_text [string]\nThe text of the 'Replace' button. This is primarily used for\nlocalization. (Write-only)\n replace_entry_text gui.find.replace_entry_text [string]\nThe text in the replace entry.\n replace_label_text gui.find.replace_label_text [string]\nThe text of the 'Replace' label. This is primarily used for\nlocalization. (Write-only)\n -replace_sel buffer.replace_sel(buffer, text)\nReplace the selected text with the argument text. The caret is positioned\nafter the inserted text and the caret is scrolled into view.\n@param buffer The focused buffer.\n@param text The text.\n -replace_target buffer.replace_target(buffer, text)\nReplace the target text with the argument text. After replacement, the\ntarget range refers to the replacement text. Returns the length of the\nreplacement text.\n@param buffer The focused buffer.\n@param text The text (can contain NULs).\n@return number\n -replace_target_re buffer.replace_target_re(buffer, text)\nReplace the target text with the argument text after \d processing. Looks for\n\d where d is between 1 and 9 and replaces these with the strings matched in\nthe last search operation which were surrounded by \( and \). Returns the\nlength of the replacement text including any change caused by processing\nthe \d patterns.\n@param buffer The focused buffer.\n@param text The text (can contain NULs).\n@return number\n +replace_sel buffer.replace_sel(buffer, text)\nReplace the selected text with the argument text. The caret is positioned\nafter the inserted text and the caret is scrolled into view.\n@param buffer The global buffer.\n@param text The text.\n +replace_target buffer.replace_target(buffer, text)\nReplace the target text with the argument text. After replacement, the\ntarget range refers to the replacement text. Returns the length of the\nreplacement text.\n@param buffer The global buffer.\n@param text The text (can contain NULs).\n@return number\n +replace_target_re buffer.replace_target_re(buffer, text)\nReplace the target text with the argument text after \d processing. Looks for\n\d where d is between 1 and 9 and replaces these with the strings matched in\nthe last search operation which were surrounded by \( and \). Returns the\nlength of the replacement text including any change caused by processing\nthe \d patterns.\n@param buffer The global buffer.\n@param text The text (can contain NULs).\n@return number\n require _G.require(modname)\nLoads the given module. The function starts by looking into the\n`package.loaded` table to determine whether `modname` is already\nloaded. If it is, then `require` returns the value stored at\n`package.loaded[modname]`. Otherwise, it tries to find a *loader* for the\nmodule. To find a loader, `require` is guided by the `package.loaders`\narray. By changing this array, we can change how `require` looks for a\nmodule. The following explanation is based on the default configuration for\n`package.loaders`. First `require` queries `package.preload[modname]`. If it\nhas a value, this value (which should be a function) is the loader. Otherwise\n`require` searches for a Lua loader using the path stored in `package.path`. If\nthat also fails, it searches for a C loader using the path stored in\n`package.cpath`. If that also fails, it tries an *all-in-one* loader (see\n`package.loaders`). Once a loader is found, `require` calls the loader with\na single argument, `modname`. If the loader returns any value, `require`\nassigns the returned value to `package.loaded[modname]`. If the loader returns\nno value and has not assigned any value to `package.loaded[modname]`, then\n`require` assigns true to this entry. In any case, `require` returns the\nfinal value of `package.loaded[modname]`. If there is any error loading or\nrunning the module, or if it cannot find any loader for the module, then\n`require` signals an error.\n reset _G.reset()\nResets the Lua state by reloading all init scripts. Language-specific modules\nfor opened files are NOT reloaded. Re-opening the files that use them will\nreload those modules. This function is useful for modifying init scripts\n(such as keys.lua) on the fly without having to restart Textadept. A global\nRESETTING variable is set to true when re-initing the Lua State. Any scripts\nthat need to differentiate between startup and reset can utilize this variable.\n resume coroutine.resume(co [, val1, ···])\nStarts or continues the execution of coroutine `co`. The first time you resume\na coroutine, it starts running its body. The values `val1`, ··· are passed\nas the arguments to the body function. If the coroutine has yielded, `resume`\nrestarts it; the values `val1`, ··· are passed as the results from the\nyield. If the coroutine runs without any errors, `resume` returns true plus\nany values passed to `yield` (if the coroutine yields) or any values returned\nby the body function (if the coroutine terminates). If there is any error,\n`resume` returns false plus the error message.\n reverse string.reverse(s)\nReturns a string that is the string `s` reversed.\n rgba_image_height buffer.rgba_image_height [number]\nThe height for future RGBA image data.\n rgba_image_width buffer.rgba_image_width [number]\nThe width for future RGBA image data.\n -rhtml _G.keys.rhtml [table]\nContainer for RHTML-specific key commands.\n -rhtml _G.snippets.rhtml [table]\nContainer for RHTML-specific snippets.\n -rhtml _m.rhtml [module]\nThe RHTML module. It provides utilities for editing RHTML. User tags are\nloaded from _USERHOME/modules/rhtml/tags and user apis are loaded from\n_USERHOME/modules/rhtml/api.\n rmdir lfs.rmdir(dirname)\nRemoves an existing directory. The argument is the name of the\ndirectory. Returns true if the operation was successful; in case of error,\nit returns nil plus an error string.\n -rotate_selection buffer.rotate_selection(buffer)\nSet the main selection to the next selection.\n@param buffer The focused buffer.\n -ruby _G.keys.ruby [table]\nContainer for Ruby-specific key commands.\n -ruby _G.snippets.ruby [table]\nContainer for Ruby-specific snippets.\n -ruby _m.ruby [module]\nThe ruby module. It provides utilities for editing Ruby code. User tags\nare loaded from _USERHOME/modules/ruby/tags and user apis are loaded from\n_USERHOME/modules/ruby/api.\n +rotate_selection buffer.rotate_selection(buffer)\nSet the main selection to the next selection.\n@param buffer The global buffer.\n run _m.textadept.run [module]\nModule for running/executing source files. Typically, language-specific\nmodules populate the 'compile_command', 'run_command', and 'error_detail'\ntables for a particular language's file extension.\n run _m.textadept.run.run()\nRuns/executes the file as specified by its extension in the run_command table.\n@see run_command\n run_command _m.textadept.run.run_command [table]\nFile extensions and their associated 'go' actions. Each key is a file extension\nwhose value is either a command line string to execute or a function returning\none. This table is typically populated by language-specific modules.\n running coroutine.running()\nReturns the running coroutine, or nil when called by the main thread.\n save _m.textadept.session.save(filename)\nSaves a Textadept session to a file. Saves split views, opened buffers,\ncursor information, and project manager details.\n@param filename The absolute path to the session file to save. Defaults to\neither the current session file or DEFAULT_SESSION if not specified.\n@usage _m.textadept.session.save(filename)\n -save buffer.save(buffer)\nSaves the current buffer to a file.\n@param buffer The focused buffer.\n +save buffer.save(buffer)\nSaves the current buffer to a file.\n@param buffer The global buffer.\n save_all io.save_all()\nSaves all dirty buffers to their respective files.\n@usage io.save_all()\n -save_as buffer.save_as(buffer, utf8_filename)\nSaves the current buffer to a file different than its filename property.\n@param buffer The focused buffer.\n@param utf8_filename The new filepath to save the buffer to. Must be UTF-8\nencoded.\n -scroll_caret buffer.scroll_caret(buffer)\nEnsure the caret is visible.\n@param buffer The focused buffer.\n -scroll_to_end buffer.scroll_to_end(buffer)\nScroll to end of document.\n@param buffer The focused buffer.\n -scroll_to_start buffer.scroll_to_start(buffer)\nScroll to start of document.\n@param buffer The focused buffer.\n +save_as buffer.save_as(buffer, utf8_filename)\nSaves the current buffer to a file different than its filename property.\n@param buffer The global buffer.\n@param utf8_filename The new filepath to save the buffer to. Must be UTF-8\nencoded.\n +scroll_caret buffer.scroll_caret(buffer)\nEnsure the caret is visible.\n@param buffer The global buffer.\n +scroll_to_end buffer.scroll_to_end(buffer)\nScroll to end of document.\n@param buffer The global buffer.\n +scroll_to_start buffer.scroll_to_start(buffer)\nScroll to start of document.\n@param buffer The global buffer.\n scroll_width buffer.scroll_width [number]\nThe document width assumed for scrolling. For performance, the view does not\nmeasure the display width of the document to determine the properties of the\nhorizontal scroll bar. Instead, an assumed width is used. The default value\nis 2000. To ensure the width of the currently visible lines can be scrolled\nuse `buffer.scroll_width_tracking`.\n scroll_width_tracking buffer.scroll_width_tracking [bool]\nWhether the maximum width line displayed is used to set scroll width.\n -search_anchor buffer.search_anchor(buffer)\nSets the current caret position to be the search anchor. Always call this\nbefore calling either of `buffer:search_next()` or `buffer:search_prev()`.\n@param buffer The focused buffer.\n +search_anchor buffer.search_anchor(buffer)\nSets the current caret position to be the search anchor. Always call this\nbefore calling either of `buffer:search_next()` or `buffer:search_prev()`.\n@param buffer The global buffer.\n search_flags buffer.search_flags [number]\nThe search flags used by `buffer:search_in_target()`.\n * `_SCINTILLA.constants.SCFIND_WHOLEWORD` (2): A match only occurs with\n text that matches the case of the search string.\n * `_SCINTILLA.constants.SCFIND_MATCHCASE` (4): A match only occurs if\n the characters before and after are not word characters.\n * `_SCINTILLA.constants.SCFIND_WORDSTART` (0x00100000): A match only\n occurs if the character before is not a word character.\n * `_SCINTILLA.constants.SCFIND_REGEXP` (0x00200000): The search string\n should be interpreted as a regular expression.\n * `_SCINTILLA.constants.SCFIND_POSIX` (0x00400000): Treat regular\n expression in a more POSIX compatible manner by interpreting bare `(`\n and `)` for tagged sections rather than `\(` and `\)`.\n\n -search_in_target buffer.search_in_target(buffer, text)\nSearch for a counted string in the target and set the target to the found\nrange. Returns length of range or -1 for failure in which case target is\nnot moved.\n@param buffer The focused buffer.\n@param text The text (can contain NULs).\n@return number\n -search_next buffer.search_next(buffer, flags, text)\nFind some text starting at the search anchor. The return value is -1 if\nnothing is found, otherwise the return value is the start position of the\nmatching text. The selection is updated to show the matched text, but is\nnot scrolled into view.\n@param buffer The focused buffer.\n@param flags Search flags. See `buffer.search_flags`.\n@param text The text.\n@return number\n -search_prev buffer.search_prev(buffer, flags, text)\nFind some text starting at the search anchor and moving backwards. The\nreturn value is -1 if nothing is found, otherwise the return value is the\nstart position of the matching text. The selection is updated to show the\nmatched text, but is not scrolled into view.\n@param buffer The focused buffer.\n@param flags Search flags. See `buffer.search_flags`.\n@param text The text.\n@return number\n +search_in_target buffer.search_in_target(buffer, text)\nSearch for a counted string in the target and set the target to the found\nrange. Returns length of range or -1 for failure in which case target is\nnot moved.\n@param buffer The global buffer.\n@param text The text (can contain NULs).\n@return number\n +search_next buffer.search_next(buffer, flags, text)\nFind some text starting at the search anchor. The return value is -1 if\nnothing is found, otherwise the return value is the start position of the\nmatching text. The selection is updated to show the matched text, but is\nnot scrolled into view.\n@param buffer The global buffer.\n@param flags Search flags. See `buffer.search_flags`.\n@param text The text.\n@return number\n +search_prev buffer.search_prev(buffer, flags, text)\nFind some text starting at the search anchor and moving backwards. The\nreturn value is -1 if nothing is found, otherwise the return value is the\nstart position of the matching text. The selection is updated to show the\nmatched text, but is not scrolled into view.\n@param buffer The global buffer.\n@param flags Search flags. See `buffer.search_flags`.\n@param text The text.\n@return number\n seeall package.seeall(module)\nSets a metatable for `module` with its `__index` field referring to the\nglobal environment, so that this module inherits values from the global\nenvironment. To be used as an option to function `module`.\n seek file:seek([whence] [, offset])\nSets and gets the file position, measured from the beginning of the file,\nto the position given by `offset` plus a base specified by the string\n`whence`, as follows: "set": base is position 0 (beginning of the file);\n"cur": base is current position; "end": base is end of file; In case of\nsuccess, function `seek` returns the final file position, measured in bytes\nfrom the beginning of the file. If this function fails, it returns nil, plus\na string describing the error. The default value for `whence` is `"cur"`, and\nfor `offset` is 0. Therefore, the call `file:seek()` returns the current file\nposition, without changing it; the call `file:seek("set")` sets the position\nto the beginning of the file (and returns 0); and the call `file:seek("end")`\nsets the position to the end of the file, and returns its size.\n sel_alpha buffer.sel_alpha [number]\nThe alpha of the selection, between 0 (transparent) and 255 (opaque), or\n256 for no alpha.\n sel_eol_filled buffer.sel_eol_filled [bool]\nThe selection end of line fill. The selection can be drawn up to the right\nhand border by setting this property.\n select _G.select(index, ···)\nIf `index` is a number, returns all arguments after argument number\n`index`. Otherwise, `index` must be the string `"#"`, and `select` returns\nthe total number of extra arguments it received.\n -select_all buffer.select_all(buffer)\nSelect all the text in the document. The current position is not scrolled\ninto view.\n@param buffer The focused buffer.\n +select_all buffer.select_all(buffer)\nSelect all the text in the document. The current position is not scrolled\ninto view.\n@param buffer The global buffer.\n select_command _m.textadept.menu.select_command()\nPrompts the user with a filteredlist to run menu commands.\n select_enclosed _m.textadept.editing.select_enclosed(left, right)\nSelects text between a given pair of strings.\n@param left The left part of the enclosure.\n@param right The right part of the enclosure.\n select_indented_block _m.textadept.editing.select_indented_block()\nSelects indented blocks intelligently. If no block of text is selected, all\ntext with the current level of indentation is selected. If a block of text is\nselected and the lines to the top and bottom of it are one indentation level\nlower, they are added to the selection. In all other cases, the behavior is\nthe same as if no text is selected.\n @@ -1376,7 +1349,7 @@ select_lexer _m.textadept.mime_types.select_lexer()\nPrompts the user to select select_line _m.textadept.editing.select_line()\nSelects the current line.\n select_paragraph _m.textadept.editing.select_paragraph()\nSelects the current paragraph. Paragraphs are delimited by two or more\nconsecutive newlines.\n select_style _m.textadept.editing.select_style()\nSelects all text with the same style as under the caret.\n -selection_duplicate buffer.selection_duplicate(buffer)\nDuplicate the selection. If selection empty duplicate the line containing\nthe caret.\n@param buffer The focused buffer.\n +selection_duplicate buffer.selection_duplicate(buffer)\nDuplicate the selection. If selection empty duplicate the line containing\nthe caret.\n@param buffer The global buffer.\n selection_end buffer.selection_end [number]\nThe position that ends the selection - this becomes the current position. This\ndoes not make the caret visible.\n selection_is_rectangle buffer.selection_is_rectangle [bool]\nIs the selection rectangular? The alternative is the more common stream\nselection. (Read-only)\n selection_mode buffer.selection_mode [number]\nThe mode of the current selection.\n * `_SCINTILLA.constants.SC_SEL_STREAM` (0): Stream.\n * `_SCINTILLA.constants.SC_SEL_RECTANGLE` (1): Rectangle.\n * `_SCINTILLA.constants.SC_SEL_LINES` (2): Lines.\n * `_SCINTILLA.constants.SC_SEL_THIN` (3): Thin rectangular.\n\n @@ -1390,47 +1363,35 @@ selection_start buffer.selection_start [number]\nThe position that starts the se selections buffer.selections [number]\nThe number of selections currently active. (Read-only)\n self _m.textadept.adeptsense.syntax.self\nThe language's syntax-equivalent of 'self'. Default is 'self'.\n sense _m.cpp.sense\nThe C/C++ Adeptsense.\n -sense _m.css.sense\nThe CSS Adeptsense.\n -sense _m.hypertext.sense\nThe HTML Adeptsense.\n -sense _m.java.sense\nThe Java Adeptsense.\n sense _m.lua.sense\nThe Lua Adeptsense.\n -sense _m.php.sense\nThe PHP Adeptsense.\n -sense _m.rails.sense\nThe Rails Adeptsense.\n -sense _m.rhtml.sense\nThe RHTML Adeptsense.\n -sense _m.ruby.sense\nThe Ruby Adeptsense.\n session _m.textadept.session [module]\nSession support for the textadept module.\n set_buffer_properties _m.cpp.set_buffer_properties()\nSets default buffer properties for C/C++ files.\n -set_buffer_properties _m.css.set_buffer_properties()\nSets default buffer properties for CSS files.\n -set_buffer_properties _m.hypertext.set_buffer_properties()\nSets default buffer properties for HTML files.\n -set_buffer_properties _m.java.set_buffer_properties()\nSets default buffer properties for Java files.\n set_buffer_properties _m.lua.set_buffer_properties()\nSets default buffer properties for Lua files.\n -set_buffer_properties _m.php.set_buffer_properties()\nSets default buffer properties for PHP files.\n -set_buffer_properties _m.ruby.set_buffer_properties()\nSets default buffer properties for Ruby files.\n -set_chars_default buffer.set_chars_default(buffer)\nReset the set of characters for whitespace and word characters to the\ndefaults. This sets whitespace to space, tab and other characters with codes\nless than 0x20, with word characters set to alphanumeric and '_'.\n@param buffer The focused buffer.\n +set_chars_default buffer.set_chars_default(buffer)\nReset the set of characters for whitespace and word characters to the\ndefaults. This sets whitespace to space, tab and other characters with codes\nless than 0x20, with word characters set to alphanumeric and '_'.\n@param buffer The global buffer.\n set_contextmenu _m.textadept.menu.set_contextmenu(menu_table)\nSets gui.context_menu from the given menu table.\n@param menu_table The menu table to create the context menu from. Each table\nentry is either a submenu or menu text and a function or action table.\n@see set_menubar\n set_empty_selection buffer.set_empty_selection(buffer, pos)\nSet caret to a position, while removing any existing selection. The caret\nis not scrolled into view.\n@param buffer The buffer\n@param pos The position to move to.\n -set_encoding buffer.set_encoding(buffer, encoding)\nSets the encoding for the buffer, converting its contents in the process.\n@param buffer The focused buffer.\n@param encoding The encoding to set. Valid encodings are ones that GTK's\ng_convert() function accepts (typically GNU iconv's encodings).\n@usage buffer.set_encoding(buffer, 'ASCII')\n -set_fold_flags buffer.set_fold_flags(buffer, flags)\nSet some style options for folding.\n@param buffer The focused buffer.\n@param flags Mask of fold flags. Flags available are\n`_SCINTILLA.constants.SC_FOLDFLAG_LINEBEFORE_EXPANDED` (2): Draw above if\nexpanded; `_SCINTILLA.constants.SC_FOLDFLAG_LINEBEFORE_CONTRACTED`\n(4): Draw above if not expanded;\n`_SCINTILLA.constants.SC_FOLDFLAG_LINEAFTER_EXPANDED` (8): Draw below if\nexpanded; `_SCINTILLA.constants.SC_FOLDFLAG_LINEAFTER_CONTRACTED` (16):\nDraw below if not expanded\n -set_fold_margin_colour buffer.set_fold_margin_colour(buffer, use_setting, color)\nSet the colors used as a chequerboard pattern in the fold margin.\n@param buffer The focused buffer.\n@param use_setting Enable color change.\n@param color A color in 0xBBGGRR format.\n -set_fold_margin_hi_colour buffer.set_fold_margin_hi_colour(buffer, use_setting, color)\nSet the colors used as a chequerboard pattern in the fold margin.\n@param buffer The focused buffer.\n@param use_setting Enable color change.\n@param color A color in 0xBBGGRR format.\n -set_hotspot_active_back buffer.set_hotspot_active_back(buffer, use_setting, color)\nSet a back color for active hotspots.\n@param buffer The focused buffer.\n@param use_setting Enable the color change.\n@param color A color in 0xBBGGRR format.\n -set_hotspot_active_fore buffer.set_hotspot_active_fore(buffer, use_setting, color)\nSet a fore color for active hotspots.\n@param buffer The focused buffer.\n@param use_setting Enable the color change.\n@param color A color in 0xBBGGRR format.\n -set_length_for_encode buffer.set_length_for_encode(buffer, bytes)\nSet the length of the utf8 argument for calling `buffer:encoded_from_utf8()`.\n@param buffer The focused buffer.\n@param bytes Bytes or -1 for measuring to first nul.\n -set_lexer buffer.set_lexer(buffer, lang)\nReplacement for buffer.set_lexer_language(buffer). Sets a buffer._lexer field\nso it can be restored without querying the mime-types tables. Also if the user\nmanually sets the lexer, it should be restored. Loads the language-specific\nmodule if it exists.\n@param buffer The focused buffer.\n@param lang The string language to set.\n@usage buffer.set_lexer(buffer, 'language_name')\n -set_lexer_language buffer.set_lexer_language(buffer, language_name)\nSet the lexing language of the document based on string name.\n@param buffer The focused buffer.\n@param language_name The language name.\n +set_encoding buffer.set_encoding(buffer, encoding)\nSets the encoding for the buffer, converting its contents in the process.\n@param buffer The global buffer.\n@param encoding The encoding to set. Valid encodings are ones that GTK's\ng_convert() function accepts (typically GNU iconv's encodings).\n@usage buffer.set_encoding(buffer, 'ASCII')\n +set_fold_flags buffer.set_fold_flags(buffer, flags)\nSet some style options for folding.\n@param buffer The global buffer.\n@param flags Mask of fold flags. Flags available are\n`_SCINTILLA.constants.SC_FOLDFLAG_LINEBEFORE_EXPANDED` (2): Draw above if\nexpanded; `_SCINTILLA.constants.SC_FOLDFLAG_LINEBEFORE_CONTRACTED`\n(4): Draw above if not expanded;\n`_SCINTILLA.constants.SC_FOLDFLAG_LINEAFTER_EXPANDED` (8): Draw below if\nexpanded; `_SCINTILLA.constants.SC_FOLDFLAG_LINEAFTER_CONTRACTED` (16):\nDraw below if not expanded\n +set_fold_margin_colour buffer.set_fold_margin_colour(buffer, use_setting, color)\nSet the colors used as a chequerboard pattern in the fold margin.\n@param buffer The global buffer.\n@param use_setting Enable color change.\n@param color A color in 0xBBGGRR format.\n +set_fold_margin_hi_colour buffer.set_fold_margin_hi_colour(buffer, use_setting, color)\nSet the colors used as a chequerboard pattern in the fold margin.\n@param buffer The global buffer.\n@param use_setting Enable color change.\n@param color A color in 0xBBGGRR format.\n +set_hotspot_active_back buffer.set_hotspot_active_back(buffer, use_setting, color)\nSet a back color for active hotspots.\n@param buffer The global buffer.\n@param use_setting Enable the color change.\n@param color A color in 0xBBGGRR format.\n +set_hotspot_active_fore buffer.set_hotspot_active_fore(buffer, use_setting, color)\nSet a fore color for active hotspots.\n@param buffer The global buffer.\n@param use_setting Enable the color change.\n@param color A color in 0xBBGGRR format.\n +set_length_for_encode buffer.set_length_for_encode(buffer, bytes)\nSet the length of the utf8 argument for calling `buffer:encoded_from_utf8()`.\n@param buffer The global buffer.\n@param bytes Bytes or -1 for measuring to first nul.\n +set_lexer buffer.set_lexer(buffer, lang)\nReplacement for buffer.set_lexer_language(buffer). Sets a buffer._lexer field\nso it can be restored without querying the mime-types tables. Also if the user\nmanually sets the lexer, it should be restored. Loads the language-specific\nmodule if it exists.\n@param buffer The global buffer.\n@param lang The string language to set.\n@usage buffer.set_lexer(buffer, 'language_name')\n +set_lexer_language buffer.set_lexer_language(buffer, language_name)\nSet the lexing language of the document based on string name.\n@param buffer The global buffer.\n@param language_name The language name.\n set_menubar _m.textadept.menu.set_menubar(menubar)\nSets gui.menubar from the given table of menus.\n@param menubar The table of menus to create the menubar from. Each table\nentry is another table that corresponds to a particular menu. A menu can\nhave a 'title' key with string value. Each menu item is either a submenu\n(another menu table) or a table consisting of two items: string menu text\nand a function or action table just like in `keys`. The table can optionally\ncontain 2 more number values: a GDK keycode and modifier mask for setting\na menu accelerator. If the menu text is 'separator', a menu separator is\ncreated and no action table is required.\n@see keys.get_gdk_key\n -set_save_point buffer.set_save_point(buffer)\nRemember the current position in the undo history as the position at which\nthe document was saved.\n@param buffer The focused buffer.\n -set_sel buffer.set_sel(buffer, start_pos, end_pos)\nSelect a range of text. The caret is scrolled into view after this operation.\n@param buffer The focused buffer.\n@param start_pos Start position. If negative, it means the end of the document.\n@param end_pos End position. If negative, it means remove any selection\n(i.e. set the anchor to the same position as current_pos).\n -set_sel_back buffer.set_sel_back(buffer, use_setting, color)\nSet the background color of the main and additional selections and whether\nto use this setting.\n@param buffer The focused buffer.\n@param use_setting Enable color change.\n@param color A color in 0xBBGGRR format.\n -set_sel_fore buffer.set_sel_fore(buffer, use_setting, color)\nSet the foreground color of the main and additional selections and whether\nto use this setting.\n@param buffer The focused buffer.\n@param use_setting Enable color change.\n@param color A color in 0xBBGGRR format.\n -set_selection buffer.set_selection(buffer, caret, anchor)\nSet a simple selection from anchor to caret.\n@param buffer The focused buffer.\n@param caret The caret.\n@param anchor The anchor.\n -set_styling buffer.set_styling(buffer, length, style)\nChange style from current styling position for length characters to a style\nand move the current styling position to after this newly styled segment.\n@param buffer The focused buffer.\n@param length The length to style.\n@param style The style number to set.\n -set_text buffer.set_text(buffer, text)\nReplace the contents of the document with the argument text.\n@param buffer The focused buffer.\n@param text The text.\n -set_visible_policy buffer.set_visible_policy(buffer, visible_policy, visible_slop)\nSet the way the display area is determined when a particular line is to\nbe moved to by `buffer:goto_line()`, etc. It is similar in operation to\n`buffer:set_y_caret_policy()`.\n@param buffer The focused buffer.\n@param visible_policy A combination of `_SCINTILLA.constants.VISIBLE_SLOP`,\n(0x01) and `_SCINTILLA.constants.VISIBLE_STRICT` (0x04).\n@param visible_slop The slop value.\n -set_whitespace_back buffer.set_whitespace_back(buffer, use_setting, color)\nSet the background color of all whitespace and whether to use this setting.\n@param buffer The focused buffer.\n@param use_setting Enable color change.\n@param color A color in 0xBBGGRR format.\n -set_whitespace_fore buffer.set_whitespace_fore(buffer, use_setting, color)\nSet the foreground color of all whitespace and whether to use this setting.\n@param buffer The focused buffer.\n@param use_setting Enable color change.\n@param color A color in 0xBBGGRR format.\n -set_x_caret_policy buffer.set_x_caret_policy(buffer, caret_policy, caret_slop)\nSet the way the caret is kept visible when going sideway. The exclusion zone\nis given in pixels.\n@param buffer The focused buffer.\n@param caret_policy A combination of `_SCINTILLA.constants.CARET_SLOP` (0x01),\n`_SCINTILLA.constants.CARET_STRICT` (0x04), `_SCINTILLA.constants.CARET_JUMPS`\n(0x10), and `_SCINTILLA.constants.CARET_EVEN` (0x08).\n@param caret_slop A slop value.\n -set_y_caret_policy buffer.set_y_caret_policy(buffer, caret_policy, caret_slop)\nSet the way the line the caret is on is kept visible.\n@param buffer The focused buffer.\n@param caret_policy A combination of `_SCINTILLA.constants.CARET_SLOP` (0x01),\n`_SCINTILLA.constants.CARET_STRICT` (0x04), `_SCINTILLA.constants.CARET_JUMPS`\n(0x10), and `_SCINTILLA.constants.CARET_EVEN` (0x08).\n@param caret_slop A slop value.\n +set_save_point buffer.set_save_point(buffer)\nRemember the current position in the undo history as the position at which\nthe document was saved.\n@param buffer The global buffer.\n +set_sel buffer.set_sel(buffer, start_pos, end_pos)\nSelect a range of text. The caret is scrolled into view after this operation.\n@param buffer The global buffer.\n@param start_pos Start position. If negative, it means the end of the document.\n@param end_pos End position. If negative, it means remove any selection\n(i.e. set the anchor to the same position as current_pos).\n +set_sel_back buffer.set_sel_back(buffer, use_setting, color)\nSet the background color of the main and additional selections and whether\nto use this setting.\n@param buffer The global buffer.\n@param use_setting Enable color change.\n@param color A color in 0xBBGGRR format.\n +set_sel_fore buffer.set_sel_fore(buffer, use_setting, color)\nSet the foreground color of the main and additional selections and whether\nto use this setting.\n@param buffer The global buffer.\n@param use_setting Enable color change.\n@param color A color in 0xBBGGRR format.\n +set_selection buffer.set_selection(buffer, caret, anchor)\nSet a simple selection from anchor to caret.\n@param buffer The global buffer.\n@param caret The caret.\n@param anchor The anchor.\n +set_styling buffer.set_styling(buffer, length, style)\nChange style from current styling position for length characters to a style\nand move the current styling position to after this newly styled segment.\n@param buffer The global buffer.\n@param length The length to style.\n@param style The style number to set.\n +set_text buffer.set_text(buffer, text)\nReplace the contents of the document with the argument text.\n@param buffer The global buffer.\n@param text The text.\n +set_visible_policy buffer.set_visible_policy(buffer, visible_policy, visible_slop)\nSet the way the display area is determined when a particular line is to\nbe moved to by `buffer:goto_line()`, etc. It is similar in operation to\n`buffer:set_y_caret_policy()`.\n@param buffer The global buffer.\n@param visible_policy A combination of `_SCINTILLA.constants.VISIBLE_SLOP`,\n(0x01) and `_SCINTILLA.constants.VISIBLE_STRICT` (0x04).\n@param visible_slop The slop value.\n +set_whitespace_back buffer.set_whitespace_back(buffer, use_setting, color)\nSet the background color of all whitespace and whether to use this setting.\n@param buffer The global buffer.\n@param use_setting Enable color change.\n@param color A color in 0xBBGGRR format.\n +set_whitespace_fore buffer.set_whitespace_fore(buffer, use_setting, color)\nSet the foreground color of all whitespace and whether to use this setting.\n@param buffer The global buffer.\n@param use_setting Enable color change.\n@param color A color in 0xBBGGRR format.\n +set_x_caret_policy buffer.set_x_caret_policy(buffer, caret_policy, caret_slop)\nSet the way the caret is kept visible when going sideway. The exclusion zone\nis given in pixels.\n@param buffer The global buffer.\n@param caret_policy A combination of `_SCINTILLA.constants.CARET_SLOP` (0x01),\n`_SCINTILLA.constants.CARET_STRICT` (0x04), `_SCINTILLA.constants.CARET_JUMPS`\n(0x10), and `_SCINTILLA.constants.CARET_EVEN` (0x08).\n@param caret_slop A slop value.\n +set_y_caret_policy buffer.set_y_caret_policy(buffer, caret_policy, caret_slop)\nSet the way the line the caret is on is kept visible.\n@param buffer The global buffer.\n@param caret_policy A combination of `_SCINTILLA.constants.CARET_SLOP` (0x01),\n`_SCINTILLA.constants.CARET_STRICT` (0x04), `_SCINTILLA.constants.CARET_JUMPS`\n(0x10), and `_SCINTILLA.constants.CARET_EVEN` (0x08).\n@param caret_slop A slop value.\n setfenv _G.setfenv(f, table)\nSets the environment to be used by the given function. `f` can be a Lua\nfunction or a number that specifies the function at that stack level: Level 1\nis the function calling `setfenv`. `setfenv` returns the given function. As a\nspecial case, when `f` is 0 `setfenv` changes the environment of the running\nthread. In this case, `setfenv` returns no values.\n setfenv debug.setfenv(object, table)\nSets the environment of the given `object` to the given `table`. Returns\n`object`.\n sethook debug.sethook([thread, ] hook, mask [, count])\nSets the given function as a hook. The string `mask` and the number `count`\ndescribe when the hook will be called. The string mask may have the following\ncharacters, with the given meaning: `"c"`: the hook is called every time\nLua calls a function; `"r"`: the hook is called every time Lua returns from\na function; `"l"`: the hook is called every time Lua enters a new line of\ncode. With a `count` different from zero, the hook is called after every\n`count` instructions. When called without arguments, `debug.sethook` turns\noff the hook. When the hook is called, its first parameter is a string\ndescribing the event that has triggered its call: `"call"`, `"return"`\n(or `"tail return"`, when simulating a return from a tail call), `"line"`,\nand `"count"`. For line events, the hook also gets the new line number as\nits second parameter. Inside a hook, you can call `getinfo` with level 2 to\nget more information about the running function (level 0 is the `getinfo`\nfunction, and level 1 is the hook function), unless the event is `"tail\nreturn"`. In this case, Lua is only simulating the return, and a call to\n`getinfo` will return invalid data.\n @@ -1445,9 +1406,8 @@ setvbuf file:setvbuf(mode [, size])\nSets the buffering mode for an output file. shebangs _m.textadept.mime_types.shebangs [table]\nShebang words and their associated lexers.\n show_apidoc _m.textadept.adeptsense.show_apidoc(sense)\nShows a calltip with API documentation for the symbol behind the caret.\n@param sense The adeptsense returned by adeptsense.new().\n@return true on success or false.\n@see get_symbol\n@see get_apidoc\n show_documentation _m.textadept.adeptsense.show_documentation()\nShows API documentation for the symbol at the current position based on the\ncurrent lexer's Adeptsense. This should be called by key commands and menus\ninstead of `show_apidoc`.\n -show_lines buffer.show_lines(buffer, start_line, end_line)\nMake a range of lines visible. This has no effect on fold levels or fold\nflags. start_line can not be hidden.\n@param buffer The focused buffer.\n@param start_line The start line.\n@param end_line The end line.\n +show_lines buffer.show_lines(buffer, start_line, end_line)\nMake a range of lines visible. This has no effect on fold levels or fold\nflags. start_line can not be hidden.\n@param buffer The global buffer.\n@param start_line The start line.\n@param end_line The end line.\n sin math.sin(x)\nReturns the sine of `x` (assumed to be in radians).\n -singular _m.rails.singular\nA map of plural controller names to their singulars. Add key-value pairs to\nthis if singularize() is incorrectly converting your plural controller name\nto its singular model name.\n sinh math.sinh(x)\nReturns the hyperbolic sine of `x`.\n size gui.size [table]\nThe size of the Textadept window (`{ width, height }`).\n size view.size [number]\nThe position of the split resizer (if this view is part of a split view).\n @@ -1456,10 +1416,10 @@ snippets _G.snippets [table]\nProvides access to snippets from _G.\n snippets _m.textadept.snippets [module]\nProvides Lua-style snippets for Textadept.\n sort table.sort(table [, comp])\nSorts table elements in a given order, *in-place*, from `table[1]` to\n`table[n]`, where `n` is the length of the table. If `comp` is given, then it\nmust be a function that receives two table elements, and returns true when the\nfirst is less than the second (so that `not comp(a[i+1],a[i])` will be true\nafter the sort). If `comp` is not given, then the standard Lua operator `<`\nis used instead. The sort algorithm is not stable; that is, elements considered\nequal by the given order may have their relative positions changed by the sort.\n space lexer.space\nMatches any whitespace character (`\t`, `\v`, `\f`, `\\n`, `\r`, space).\n -split view:split(vertical)\nSplits the indexed view vertically or horizontally and focuses the new view.\n@param vertical Flag indicating a vertical split. False for horizontal.\n@return old view and new view tables.\n +split view:split(vertical)\nSplits the indexed view vertically or horizontally and focuses the new view.\n@param vertical Flag indicating a vertical split. Defaults to false for\nhorizontal.\n@return old view and new view tables.\n sqrt math.sqrt(x)\nReturns the square root of `x`. (You can also use the expression `x^0.5`\nto compute this value.)\n -start_record buffer.start_record(buffer)\nStart notifying the container of all key presses and commands.\n@param buffer The focused buffer.\n -start_styling buffer.start_styling(buffer, position, mask)\nSet the current styling position to pos and the styling mask to mask. The\nstyling mask can be used to protect some bits in each styling byte from\nmodification.\n@param buffer The focused buffer.\n@param position The styling position.\n@param mask The bit mask of the style bytes that can be set.\n +start_record buffer.start_record(buffer)\nStart notifying the container of all key presses and commands.\n@param buffer The global buffer.\n +start_styling buffer.start_styling(buffer, position, mask)\nSet the current styling position to pos and the styling mask to mask. The\nstyling mask can be used to protect some bits in each styling byte from\nmodification.\n@param buffer The global buffer.\n@param position The styling position.\n@param mask The bit mask of the style bytes that can be set.\n starts_line lexer.starts_line(patt)\nCreates an LPeg pattern from a given pattern that matches the beginning of\na line and returns it.\n@param patt The LPeg pattern to match at the beginning of a line.\n@usage local preproc = token(l.PREPROCESSOR, #P('#') * l.starts_line('#'\n* l.nonnewline^0))\n status buffer.status [number]\nThe error status.\n * `_SCINTILLA.constants.SC_STATUS_OK` (0): No failures.\n * `_SCINTILLA.constants.SC_STATUS_FAILURE` (1): Generic failure.\n * `_SCINTILLA.constants.SC_STATUS_BADALLOC` (2): Memory is exhausted.\n\n status coroutine.status(co)\nReturns the status of coroutine `co`, as a string: `"running"`, if the\ncoroutine is running (that is, it called `status`); `"suspended"`, if the\ncoroutine is suspended in a call to `yield`, or if it has not started running\nyet; `"normal"` if the coroutine is active but not running (that is, it has\nresumed another coroutine); and `"dead"` if the coroutine has finished its\nbody function, or if it has stopped with an error.\n @@ -1467,12 +1427,12 @@ statusbar_text gui.statusbar_text [string]\nThe text displayed by the statusbar. stderr io.stderr\nStandard error.\n stdin io.stdin\nStandard in.\n stdout io.stdout\nStandard out.\n -stop_record buffer.stop_record(buffer)\nStop notifying the container of all key presses and commands.\n@param buffer The focused buffer.\n +stop_record buffer.stop_record(buffer)\nStop notifying the container of all key presses and commands.\n@param buffer The global buffer.\n string _G.string [module]\nLua string module.\n -stuttered_page_down buffer.stuttered_page_down(buffer)\nMove caret to bottom of page, or one page down if already at bottom of page.\n@param buffer The focused buffer.\n -stuttered_page_down_extend buffer.stuttered_page_down_extend(buffer)\nMove caret to bottom of page, or one page down if already at bottom of page,\nextending selection to new caret position.\n@param buffer The focused buffer.\n -stuttered_page_up buffer.stuttered_page_up(buffer)\nMove caret to top of page, or one page up if already at top of page.\n@param buffer The focused buffer.\n -stuttered_page_up_extend buffer.stuttered_page_up_extend(buffer)\nMove caret to top of page, or one page up if already at top of page, extending\nselection to new caret position.\n@param buffer The focused buffer.\n +stuttered_page_down buffer.stuttered_page_down(buffer)\nMove caret to bottom of page, or one page down if already at bottom of page.\n@param buffer The global buffer.\n +stuttered_page_down_extend buffer.stuttered_page_down_extend(buffer)\nMove caret to bottom of page, or one page down if already at bottom of page,\nextending selection to new caret position.\n@param buffer The global buffer.\n +stuttered_page_up buffer.stuttered_page_up(buffer)\nMove caret to top of page, or one page up if already at top of page.\n@param buffer The global buffer.\n +stuttered_page_up_extend buffer.stuttered_page_up_extend(buffer)\nMove caret to top of page, or one page up if already at top of page, extending\nselection to new caret position.\n@param buffer The global buffer.\n style lexer.style(style_table)\nCreates a Scintilla style from a table of style properties.\n@param style_table A table of style properties. Style properties available:\nfont = [string] size = [integer] bold = [boolean]\nitalic = [boolean] underline = [boolean] fore = [integer]*\nback = [integer]* eolfilled = [boolean] characterset = ? case\n= [integer] visible = [boolean] changeable = [boolean] hotspot =\n[boolean] * Use the value returned by `color()`.\n@usage local bold_italic = style { bold = true, italic = true }\n@see color\n style_at buffer.style_at [table]\nTable of style bytes at positions in the document starting at zero. (Read-only)\n style_back buffer.style_back [table]\nTable of background colors in 0xBBGGRR format for styles from zero to 255.\n @@ -1484,7 +1444,7 @@ style_changeable buffer.style_changeable [table]\nTable of booleans for changeab style_char lexer.style_char\nTypically used for character literals.\n style_character_set buffer.style_character_set [table]\nTable of character sets for styles from zero to 255.\n style_class lexer.style_class\nTypically used for class definitions.\n -style_clear_all buffer.style_clear_all(buffer)\nClear all the styles and make equivalent to the global default style.\n@param buffer The focused buffer.\n +style_clear_all buffer.style_clear_all(buffer)\nClear all the styles and make equivalent to the global default style.\n@param buffer The global buffer.\n style_comment lexer.style_comment\nTypically used for code comments.\n style_constant lexer.style_constant\nTypically used for constants.\n style_definition lexer.style_definition\nTypically used for definitions.\n @@ -1494,7 +1454,7 @@ style_error lexer.style_error\nTypically used for erroneous syntax.\n style_font buffer.style_font [table]\nTable of font faces for styles from zero to 255.\n style_fore buffer.style_fore [table]\nTable of foreground colors in 0xBBGGRR format for styles from zero to 255.\n style_function lexer.style_function\nTypically used for function definitions.\n -style_get_font buffer.style_get_font(buffer, style_num)\nReturns the font name of a given style.\n@param buffer The focused buffer.\n@param style_num The style number.\n@return string\n +style_get_font buffer.style_get_font(buffer, style_num)\nReturns the font name of a given style.\n@param buffer The global buffer.\n@param style_num The style number.\n@return string\n style_hot_spot buffer.style_hot_spot [table]\nTable of boolean hotspot styles from zero to 255.\n style_identifier lexer.style_identifier\nTypically used for identifier words.\n style_italic buffer.style_italic [table]\nTable of booleans for italic styles from zero to 255.\n @@ -1503,7 +1463,7 @@ style_nothing lexer.style_nothing\nTypically used for whitespace.\n style_number lexer.style_number\nTypically used for numbers.\n style_operator lexer.style_operator\nTypically used for operators.\n style_preproc lexer.style_preproc\nTypically used for preprocessor statements.\n -style_reset_default buffer.style_reset_default(buffer)\nReset the default style to its state at startup.\n@param buffer The focused buffer.\n +style_reset_default buffer.style_reset_default(buffer)\nReset the default style to its state at startup.\n@param buffer The global buffer.\n style_size buffer.style_size [table]\nTable of font sizes for styles from zero to 255.\n style_string lexer.style_string\nTypically used for strings.\n style_tag lexer.style_tag\nTypically used for markup tags.\n @@ -1512,26 +1472,26 @@ style_underline buffer.style_underline [table]\nTable of booleans for underlined style_variable lexer.style_variable\nTypically used for variables.\n style_visible buffer.style_visible [table]\nTable of booleans for visible styles from zero to 255.\n sub string.sub(s, i [, j])\nReturns the substring of `s` that starts at `i` and continues until `j`;\n`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 -swap_main_anchor_caret buffer.swap_main_anchor_caret(buffer)\nSwap that caret and anchor of the main selection.\n@param buffer The focused buffer.\n +swap_main_anchor_caret buffer.swap_main_anchor_caret(buffer)\nSwap that caret and anchor of the main selection.\n@param buffer The global buffer.\n switch_buffer gui.switch_buffer()\nDisplays a dialog with a list of buffers to switch to and switches to the\nselected one, if any.\n symbol_chars _m.textadept.adeptsense.syntax.symbol_chars\nA Lua pattern of characters allowed in a symbol, including member\noperators. The pattern should be a character set. Default is '[%w_%.]'.\n 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 it.\n syntax _m.textadept.adeptsense.syntax [table]\nContains syntax-specific values for the language.\n@see get_class\n -tab buffer.tab(buffer)\nIf selection is empty or all on one line replace the selection with a tab\ncharacter, or if more than one line selected, indent the lines.\n@param buffer The focused buffer.\n +tab buffer.tab(buffer)\nIf selection is empty or all on one line replace the selection with a tab\ncharacter, or if more than one line selected, indent the lines.\n@param buffer The global buffer.\n tab_indents buffer.tab_indents [bool]\nWhether a tab pressed when caret is within indentation indents.\n tab_width buffer.tab_width [number]\nThe visible size of a tab as a multiple of the width of a space character. The\ndefault tab width is 8 characters.\n table _G.table [module]\nLua table module.\n tan math.tan(x)\nReturns the tangent of `x` (assumed to be in radians).\n tanh math.tanh(x)\nReturns the hyperbolic tangent of `x`.\n -target_as_utf8 buffer.target_as_utf8(buffer)\nReturns the target converted to UTF8.\n@param buffer The focused buffer.\n +target_as_utf8 buffer.target_as_utf8(buffer)\nReturns the target converted to UTF8.\n@param buffer The global buffer.\n target_end buffer.target_end [number]\nThe position that ends the target which is used for updating the document\nwithout affecting the scroll position. The target is also set by a successful\n`buffer:search_in_target()`.\n -target_from_selection buffer.target_from_selection(buffer)\nMake the target range start and end be the same as the selection range start\nand end.\n@param buffer The focused buffer.\n +target_from_selection buffer.target_from_selection(buffer)\nMake the target range start and end be the same as the selection range start\nand end.\n@param buffer The global buffer.\n target_start buffer.target_start [number]\nThe position that starts the target which is used for updating the document\nwithout affecting the scroll position. The target is also set by a successful\n`buffer:search_in_target()`.\n teal lexer.colors.teal\nTeal.\n -text_height buffer.text_height(buffer, line)\nRetrieve the height of a particular line of text in pixels.\n@param buffer The focused buffer.\n@param line The line number.\n@return number\n +text_height buffer.text_height(buffer, line)\nRetrieve the height of a particular line of text in pixels.\n@param buffer The global buffer.\n@param line The line number.\n@return number\n text_length buffer.text_length [number]\nThe number of characters in the document. (Read-only)\n -text_range buffer.text_range(buffer, start_pos, end_pos)\nGets a range of text from the current buffer.\n@param buffer The currently focused buffer.\n@param start_pos The beginning position of the range of text to get.\n@param end_pos The end position of the range of text to get.\n -text_width buffer.text_width(buffer, style_num, text)\nMeasure the pixel width of some text in a particular style. Does not handle\ntab or control characters.\n@param buffer The focused buffer.\n@param style_num The style number.\n@param text The text.\n@return number\n +text_range buffer.text_range(buffer, start_pos, end_pos)\nGets a range of text from the current buffer.\n@param buffer The global buffer.\n@param start_pos The beginning position of the range of text to get.\n@param end_pos The end position of the range of text to get.\n +text_width buffer.text_width(buffer, style_num, text)\nMeasure the pixel width of some text in a particular style. Does not handle\ntab or control characters.\n@param buffer The global buffer.\n@param style_num The style number.\n@param text The text.\n@return number\n textadept _m.textadept [module]\nThe textadept module. It provides utilities for editing text in Textadept.\n time os.time([table])\nReturns the current time when called without arguments, or a time representing\nthe date and time specified by the given table. This table must have fields\n`year`, `month`, and `day`, and may have fields `hour`, `min`, `sec`, and\n`isdst` (for a description of these fields, see the `os.date` function). The\nreturned value is a number, whose meaning depends on your system. In POSIX,\nWindows, and some other systems, this number counts the number of seconds\nsince some given start time (the "epoch"). In other systems, the meaning\nis not specified, and the number returned by `time` can be used only as an\nargument to `date` and `difftime`.\n timeout _G.timeout(interval, f, ...)\nCalls a given function after an interval of time. To repeatedly call the\nfunction, return true inside the function. A nil or false return value\nstops repetition.\n@param interval The interval in seconds to call the function after.\n@param f The function to call.\n@param ... Additional arguments to pass to f.\n @@ -1539,9 +1499,8 @@ title gui.title [string]\nThe title of the Textadept window.\n tmpfile io.tmpfile()\nReturns a handle for a temporary file. This file is opened in update mode\nand it is automatically removed when the program ends.\n tmpname os.tmpname()\nReturns a string with a file name that can be used for a temporary file. The\nfile must be explicitly opened before its use and explicitly removed when\nno longer needed. On some systems (POSIX), this function also creates a file\nwith that name, to avoid security risks. (Someone else might create the file\nwith wrong permissions in the time between getting the name and creating\nthe file.) You still have to open the file to use it and to remove it (even\nif you do not use it). When possible, you may prefer to use `io.tmpfile`,\nwhich automatically removes the file when the program ends.\n toggle _m.textadept.bookmarks.toggle()\nToggles a bookmark on the current line.\n -toggle_block _m.ruby.toggle_block()\nToggles between { ... } and do ... end Ruby blocks. If the caret is inside\na { ... } single-line block, that block is converted to a multiple-line do\n.. end block. If the caret is on a line that contains single-line do ... end\nblock, that block is converted to a single-line { ... } block. If the caret\nis inside a multiple-line do ... end block, that block is converted to a\nsingle-line { ... } block with all newlines replaced by a space. Indentation\nis important. The 'do' and 'end' keywords must be on lines with the same\nlevel of indentation to toggle correctly\n -toggle_caret_sticky buffer.toggle_caret_sticky(buffer)\nSwitch between sticky and non-sticky: meant to be bound to a key. See\n`buffer.caret_sticky`.\n@param buffer The focused buffer.\n -toggle_fold buffer.toggle_fold(buffer, line)\nSwitch a header line between expanded and contracted.\n@param buffer The focused buffer.\n@param line The line number.\n +toggle_caret_sticky buffer.toggle_caret_sticky(buffer)\nSwitch between sticky and non-sticky: meant to be bound to a key. See\n`buffer.caret_sticky`.\n@param buffer The global buffer.\n +toggle_fold buffer.toggle_fold(buffer, line)\nSwitch a header line between expanded and contracted.\n@param buffer The global buffer.\n@param line The line number.\n token lexer.token(name, patt)\nCreates an LPeg capture table index with the name and position of the token.\n@param name The name of token. If this name is not in `l.tokens` then you\nwill have to specify a style for it in `lexer._tokenstyles`.\n@param patt The LPeg pattern associated with the token.\n@usage local ws = token(l.WHITESPACE, l.space^1)\n@usage php_start_rule = token('php_tag', ' buffer.line_count - 1 then line = 0 end if line < 0 then line = buffer.line_count - 1 end if line == orig_line then -- prevent infinite loops - orig_view:focus() + gui.goto_view(orig_view) return end if buffer:get_line(line):match('^(.+):(%d+):.+$') then diff --git a/modules/textadept/keys.lua b/modules/textadept/keys.lua index 517502ec..5672933a 100644 --- a/modules/textadept/keys.lua +++ b/modules/textadept/keys.lua @@ -234,8 +234,8 @@ keys[not OSX and 'caO' or 'cmO'] = utils.snapopen_filedir keys[not OSX and 'ci' or 'mi'] = utils.show_style -- Buffer. -keys['c\t'] = { _view.goto_buffer, _view, 1, false } -keys['cs\t'] = { _view.goto_buffer, _view, -1, false } +keys['c\t'] = { _view.goto_buffer, _view, 1, true } +keys['cs\t'] = { _view.goto_buffer, _view, -1, true } keys[not OSX and 'cb' or 'mb'] = gui.switch_buffer -- Indentation. -- TODO: { utils.set_indentation, 2 } @@ -258,11 +258,11 @@ keys[not OSX and 'cL' or 'mL'] = m_textadept.mime_types.select_lexer keys.f5 = { _buffer.colourise, _buffer, 0, -1 } -- View. -keys[not OSX and 'can' or 'ca\t'] = { gui.goto_view, 1, false } -keys[not OSX and 'cap' or 'cas\t'] = { gui.goto_view, -1, false } -keys[not OSX and 'cas' or 'cs'] = { _view.split, _view, false } +keys[not OSX and 'can' or 'ca\t'] = { gui.goto_view, 1, true } +keys[not OSX and 'cap' or 'cas\t'] = { gui.goto_view, -1, true } +keys[not OSX and 'cas' or 'cs'] = { _view.split, _view } if not OSX then keys.cah = keys.cas end -keys[not OSX and 'cav' or 'cv'] = { _view.split, _view } +keys[not OSX and 'cav' or 'cv'] = { _view.split, _view, true } keys[not OSX and 'caw' or 'cw'] = { _view.unsplit, _view } keys[not OSX and 'caW' or 'cW'] = utils.unsplit_all keys[not OSX and 'ca+' or 'c+'] = { utils.grow, 10 } diff --git a/modules/textadept/menu.lua b/modules/textadept/menu.lua index 82c72cfa..e26a2ec4 100644 --- a/modules/textadept/menu.lua +++ b/modules/textadept/menu.lua @@ -149,8 +149,8 @@ menubar = { { L('Show Style'), utils.show_style }, }, { title = L('Buffer'), - { L('Next Buffer'), { _view.goto_buffer, _view, 1, false } }, - { L('Previous Buffer'), { _view.goto_buffer, _view, -1, false } }, + { L('Next Buffer'), { _view.goto_buffer, _view, 1, true } }, + { L('Previous Buffer'), { _view.goto_buffer, _view, -1, true } }, { L('Switch to Buffer...'), gui.switch_buffer }, SEPARATOR, { title = L('Indentation'), @@ -179,11 +179,11 @@ menubar = { { L('Refresh Syntax Highlighting'), { _buffer.colourise, _buffer, 0, -1 } }, }, { title = L('View'), - { L('Next View'), { gui.goto_view, 1, false } }, - { L('Previous View'), { gui.goto_view, -1, false } }, + { L('Next View'), { gui.goto_view, 1, true } }, + { L('Previous View'), { gui.goto_view, -1, true } }, SEPARATOR, - { L('Split View Horizontal'), { _view.split, _view, false } }, - { L('Split View Vertical'), { _view.split, _view } }, + { L('Split View Horizontal'), { _view.split, _view } }, + { L('Split View Vertical'), { _view.split, _view, true } }, { L('Unsplit View'), { _view.unsplit, _view } }, { L('Unsplit All Views'), utils.unsplit_all }, { L('Grow View'), { utils.grow, 10 } }, diff --git a/modules/textadept/mime_types.lua b/modules/textadept/mime_types.lua index a7a4f4e1..3d461db4 100644 --- a/modules/textadept/mime_types.lua +++ b/modules/textadept/mime_types.lua @@ -106,7 +106,7 @@ table.sort(lexers) -- @param style_num A style number in the range 0 <= style_num < 256. -- @see buffer.style_at local function get_style_name(buffer, style_num) - gui.check_focused_buffer(buffer) + buffer:check_global() if style_num < 0 or style_num > 255 then error('0 <= style_num < 256') end return buffer:private_lexer_call(style_num) end @@ -130,7 +130,7 @@ local SETLEXERLANGUAGE = _SCINTILLA.functions.set_lexer_language[1] -- @param lang The string language to set. -- @usage buffer:set_lexer('language_name') local function set_lexer(buffer, lang) - gui.check_focused_buffer(buffer) + buffer:check_global() buffer._lexer = lang buffer:private_lexer_call(SETDIRECTPOINTER, buffer.direct_pointer) buffer:private_lexer_call(SETLEXERLANGUAGE, lang) @@ -161,7 +161,7 @@ local GETLEXERLANGUAGE = _SCINTILLA.functions.get_lexer_language[1] -- lexer can be different from the lexer passed to buffer:set_lexer(). -- Defaults to false. local function get_lexer(buffer, current) - gui.check_focused_buffer(buffer) + buffer:check_global() local lexer = buffer:private_lexer_call(GETLEXERLANGUAGE) if not current then return lexer end local i, ws, style_at = buffer.current_pos, ws_styles[lexer], buffer.style_at diff --git a/modules/textadept/session.lua b/modules/textadept/session.lua index e69f2488..1178380f 100644 --- a/modules/textadept/session.lua +++ b/modules/textadept/session.lua @@ -92,7 +92,7 @@ function load(filename) end end f:close() - _VIEWS[current_view]:focus() + gui.goto_view(current_view) if #not_found > 0 then gui.dialog('msgbox', '--title', L('Session Files Not Found'), @@ -121,7 +121,7 @@ function save(filename) for _, buffer in ipairs(_BUFFERS) do local filename = buffer.filename or buffer._type if filename then - local current = buffer.doc_pointer == gui.focused_doc_pointer + local current = buffer == view.buffer local anchor = current and 'anchor' or '_anchor' local current_pos = current and 'current_pos' or '_current_pos' local top_line = current and 'first_visible_line' or '_first_visible_line' @@ -138,32 +138,25 @@ function save(filename) local spaces = (' '):rep(level) session[#session + 1] = split_line:format(spaces, number, vertical, size) spaces = (' '):rep(level + 1) - if type(c1) == 'table' then + if c1[1] and c1[2] then write_split(c1, level + 1, 1) else - session[#session + 1] = view_line:format(spaces, 1, c1) + session[#session + 1] = view_line:format(spaces, 1, _BUFFERS[c1.buffer]) end - if type(c2) == 'table' then + if c2[1] and c2[2] then write_split(c2, level + 1, 2) else - session[#session + 1] = view_line:format(spaces, 2, c2) + session[#session + 1] = view_line:format(spaces, 2, _BUFFERS[c2.buffer]) end end local splits = gui.get_split_table() - if type(splits) == 'table' then + if splits[1] and splits[2] then write_split(splits, 0, 0) else - session[#session + 1] = view_line:format('', 1, splits) + session[#session + 1] = view_line:format('', 1, _BUFFERS[splits.buffer]) end -- Write out the current focused view. - local current_view = view - for i = 1, #_VIEWS do - if _VIEWS[i] == current_view then - current_view = i - break - end - end - session[#session + 1] = ("current_view: %d"):format(current_view) + session[#session + 1] = ("current_view: %d"):format(_VIEWS[view]) -- Write out other things. local size = gui.size session[#session + 1] = ("size: %d %d"):format(size[1], size[2]) -- cgit v1.2.3