diff options
author | mitchell <70453897+667e-11@users.noreply.github.com> | 2011-09-25 22:37:24 -0400 |
---|---|---|
committer | mitchell <70453897+667e-11@users.noreply.github.com> | 2011-09-25 22:37:24 -0400 |
commit | f10a48801dd09bb6cb058b4f783f879720d22bf0 (patch) | |
tree | 8b22a252a4b6f60cc7cb8acf862d5c770be8a28a /core/.buffer.luadoc | |
parent | 8461d29251895160755695b74ca6356a9cd8e6f3 (diff) |
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.
Diffstat (limited to 'core/.buffer.luadoc')
-rw-r--r-- | core/.buffer.luadoc | 555 |
1 files changed, 282 insertions, 273 deletions
diff --git a/core/.buffer.luadoc b/core/.buffer.luadoc index 0f38fa31..e5519c3f 100644 --- a/core/.buffer.luadoc +++ b/core/.buffer.luadoc @@ -3,7 +3,7 @@ -- global buffer table. --- --- The current buffer in the currently focused view. +-- The current buffer in the current view. -- It also represents the structure of any buffer table in 'buffers'. module('buffer') @@ -150,7 +150,6 @@ module('buffer') -- when calling the function returned by direct_function. (Read-only) -- * `dirty` [bool]: Flag indicating whether or not the buffer has been modified -- since it was last saved. --- * `doc_pointer` [number]: A pointer to the document object. (Read-only) -- * `eol_mode` [number]: The current end of line mode.<br /> -- * `_SCINTILLA.constants.SC_EOL_CRLF` (0): `CRLF`. -- * `_SCINTILLA.constants.SC_EOL_CR` (1): `CR`. @@ -598,7 +597,7 @@ module('buffer') -- always at least one selection, to set a list of selections, the first -- selection should be added with `buffer:set_selection()` and later selections -- added with this function. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param caret The caret. -- @param anchor The anchor. function buffer.add_selection(buffer, caret, anchor) end @@ -607,32 +606,32 @@ function buffer.add_selection(buffer, caret, anchor) end -- Add text to the document at current position. -- The current position is set at the end of the inserted text, but it is not -- scrolled into view. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param text The text to add. function buffer.add_text(buffer, text) end --- -- Enlarge the document to a particular size of text bytes. -- The document will not be made smaller than its current contents. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param bytes function buffer.allocate(buffer, bytes) end --- -- Clear the annotations from all lines. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.annotation_clear_all(buffer) end --- -- Get the annotation text for a line. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param line The line number. -- @return string function buffer.annotation_get_text(buffer, line) end --- -- Set the annotation text for a line. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param line The line number. -- @param text The text. function buffer.annotation_set_text(buffer, line, text) end @@ -641,7 +640,7 @@ function buffer.annotation_set_text(buffer, line, text) end -- Append a string to the end of the document without changing the selection. -- The current selection is not changed and the new text is not scrolled into -- view. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param text The text. function buffer.append_text(buffer, text) end @@ -655,31 +654,31 @@ function buffer.auto_c_active(buffer) end -- Remove the auto-completion list from the screen. -- A set of characters that will cancel autocompletion can be specified with -- buffer:auto_c_stops(). --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.auto_c_cancel(buffer) end --- -- User has selected an item so remove the list and insert the selection. -- This has the same effect as the tab key. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.auto_c_complete(buffer) end --- -- Get currently selected item position in the auto-completion list. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @return number function buffer.auto_c_get_current(buffer) end --- -- Get currently selected item text in the auto-completion list. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @return string function buffer.auto_c_get_current_text(buffer) end --- -- Retrieve the position of the caret when the auto-completion list was -- displayed. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @return number function buffer.auto_c_pos_start(buffer) end @@ -687,7 +686,7 @@ function buffer.auto_c_pos_start(buffer) end -- Select the item in the auto-completion list that starts with a string. -- By default, comparisons are case sensitive, but this can change with -- buffer.auto_c_ignore_case. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param string function buffer.auto_c_select(buffer, string) end @@ -701,31 +700,31 @@ function buffer.auto_c_show(buffer, len_entered, item_list) end --- -- Define a set of characters that when typed cancel the auto-completion list. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param chars String list of characters. This list is empty by default. function buffer.auto_c_stops(buffer, chars) end --- -- Dedent the selected lines. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.back_tab(buffer) end --- -- Start a sequence of actions that is undone and redone as a unit. -- May be nested. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.begin_undo_action(buffer) end --- -- Highlight the character at a position indicating there is no matching brace. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param pos The position or -1 to remove the highlight. function buffer.brace_bad_light(buffer, pos) end --- -- Use specified indicator to highlight non matching brace instead of changing -- its style. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param use_indicator Use an indicator. -- @param indic_num The indicator number. function buffer.brace_bad_light_indicator(buffer, use_indicator, indic_num) end @@ -735,7 +734,7 @@ function buffer.brace_bad_light_indicator(buffer, use_indicator, indic_num) end -- If indent guides are enabled, the indent that corresponds with the brace can -- be highlighted by locating the column with `buffer.column` and highlight the -- indent with `buffer.highlight_guide`. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param pos1 The first position. -- @param pos2 The second position. function buffer.brace_highlight(buffer, pos1, pos2) end @@ -743,7 +742,7 @@ function buffer.brace_highlight(buffer, pos1, pos2) end --- -- Use specified indicator to highlight matching braces instead of changing -- their style. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param use_indicator Use an indicator. -- @param indic_num The indicator number. function buffer.brace_highlight_indicator(buffer, use_indicator, indic_num) end @@ -755,14 +754,14 @@ function buffer.brace_highlight_indicator(buffer, use_indicator, indic_num) end -- brace. A match only occurs if the style of the matching brace is the same as -- the starting brace or the matching brace is beyond the end of styling. Nested -- braces are handled correctly. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param pos The position. -- @return number. function buffer.brace_match(buffer, pos) end --- -- Is there an active call tip? --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @return bool function buffer.call_tip_active(buffer) end @@ -770,18 +769,18 @@ function buffer.call_tip_active(buffer) end -- Remove the call tip from the screen. -- Call tips are also removed if any keyboard commands that are not compatible -- with editing the argument list of a function are used. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.call_tip_cancel(buffer) end --- -- Retrieve the position where the caret was before displaying the call tip. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @return number function buffer.call_tip_pos_start(buffer) end --- -- Highlights a segment of a call tip. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param start_pos The start position. -- @param end_pos The end position. function buffer.call_tip_set_hlt(buffer, start_pos, end_pos) end @@ -792,61 +791,61 @@ function buffer.call_tip_set_hlt(buffer, start_pos, end_pos) end -- and/or down arrows have been included in the call tip text in which case the -- tip is aligned to the right-hand edge of the rightmost arrow. The assumption -- is that the text starts with something like "\001 1 of 3 \002". --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param pos The position. -- @param text The text. function buffer.call_tip_show(buffer, pos, text) end --- -- Will a paste succeed? --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @return bool function buffer.can_paste(buffer) end --- -- Are there any redoable actions in the undo history? --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @return bool function buffer.can_redo(buffer) end --- -- Are there any undoable actions in the undo history? --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @return bool function buffer.can_undo(buffer) end --- -- Cancel any modes such as call tip or auto-completion list display. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.cancel(buffer) end --- -- Indicate that the internal state of a lexer has changed over a range and -- therefore there may be a need to redraw. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param start_pos The start position. -- @param end_pos The end position. function buffer.change_lexer_state(buffer, start_pos, end_pos) end --- -- Move caret left one character. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.char_left(buffer) end --- -- Move caret left one character extending selection to new caret position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.char_left_extend(buffer) end --- -- Move caret left one character, extending rectangular selection to new caret -- position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.char_left_rect_extend(buffer) end --- -- Find the position of a character from a point within the window. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param x -- @param y -- @return number @@ -855,7 +854,7 @@ function buffer.char_position_from_point(buffer, x, y) end --- -- Find the position of a character from a point within the window. -- Return -1 if not close to text. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param x -- @param y -- @return number @@ -863,18 +862,18 @@ function buffer.char_position_from_point_close(buffer, x, y) end --- -- Move caret right one character. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.char_right(buffer) end --- -- Move caret right one character extending selection to new caret position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.char_right_extend(buffer) end --- -- Move caret right one character, extending rectangular selection to new caret -- position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.char_right_rect_extend(buffer) end --- @@ -883,42 +882,42 @@ function buffer.char_right_rect_extend(buffer) end -- explicitly by the user and this value is then used when moving vertically -- such as by using the up and down keys. This function sets the current x -- position of the caret as the remembered value. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.choose_caret_x(buffer) end --- -- Clear the selection. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.clear(buffer) end --- -- Delete all text in the document. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.clear_all(buffer) end --- -- Drop all key mappings. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.clear_all_cmd_keys(buffer) end --- -- Set all style bytes to 0, remove all folding information. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.clear_document_style(buffer) end --- -- Clear all the registered XPM images. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.clear_registered_images(buffer) end --- -- Clear selections to a single empty stream selection. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.clear_selections(buffer) end --- -- colorise a segment of the document using the current lexing language. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param start_pos The start position. -- @param end_pos The end position or -1 to style from start_pos to the end of -- the document. @@ -928,14 +927,14 @@ function buffer.colourise(buffer, start_pos, end_pos) end -- Find the next line at or after line_start that is a contracted fold header -- line. -- Return -1 when no more lines. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param line_start The start line number. -- @return number function buffer.contracted_fold_next(buffer, line_start) end --- -- Converts all line endings in the document to one mode. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param mode The line ending mode. Valid values are: -- _SCINTILLA.constants.SC_EOL_CRLF (0), -- _SCINTILLA.constants.SC_EOL_CR (1), or @@ -949,57 +948,57 @@ function buffer.copy(buffer) end --- -- Copy the selection, if selection empty copy the line with the caret. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.copy_allow_line(buffer) end --- -- Copy a range of text to the clipboard. Positions are clipped into the -- document. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param start_pos The start position. -- @param end_pos The end position. function buffer.copy_range(buffer, start_pos, end_pos) end --- -- Copy argument text to the clipboard. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param text The text. function buffer.copy_text(buffer, text) end --- -- Cut the selection to the clipboard. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.cut(buffer) end --- -- Delete back from the current position to the start of the line. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.del_line_left(buffer) end --- -- Delete forwards from the current position to the end of the line. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.del_line_right(buffer) end --- -- Delete the word to the left of the caret. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.del_word_left(buffer) end --- -- Delete the word to the right of the caret. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.del_word_right(buffer) end --- -- Delete the word to the right of the caret, but not the trailing non-word -- characters. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.del_word_right_end(buffer) end --- -- Delete the selection or if no selection, the character before the caret. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.delete_back(buffer) end --- @@ -1009,67 +1008,67 @@ function buffer.delete_back_not_line(buffer) end --- -- Find the document line of a display line taking hidden lines into account. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @return number function buffer.doc_line_from_visible(buffer) end --- -- Move caret to last position in document. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.document_end(buffer) end --- -- Move caret to last position in document extending selection to new caret -- position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.document_end_extend(buffer) end --- -- Move caret to first position in document. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.document_start(buffer) end --- -- Move caret to first position in document extending selection to new caret -- position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.document_start_extend(buffer) end --- -- Switch from insert to overtype mode or the reverse. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.edit_toggle_overtype(buffer) end --- -- Delete the undo history. -- It also sets the save point to the start of the undo buffer, so the document -- will appear to be unmodified. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.empty_undo_buffer(buffer) end --- -- Translates a UTF8 string into the document encoding. -- Return the length of the result in bytes. On error return 0. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param string The string. -- @return number function buffer.encoded_from_utf8(buffer, string) end --- -- End a sequence of actions that is undone and redone as a unit. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.end_undo_action(buffer) end --- -- Ensure a particular line is visible by expanding any header line hiding it. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param line The line number. function buffer.ensure_visible(buffer, line) end --- -- Ensure a particular line is visible by expanding any header line hiding it. -- Use the currently set visibility policy to determine which range to display. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param line The line number. function buffer.ensure_visible_enforce_policy(buffer, line) end @@ -1077,51 +1076,51 @@ function buffer.ensure_visible_enforce_policy(buffer, line) end -- Find the position of a column on a line taking into account tabs and -- multi-byte characters. -- If beyond end of line, return line end position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param line The line number. -- @param column The column number. function buffer.find_column(buffer, line, column) end --- -- Insert a Form Feed character. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.form_feed(buffer) end --- -- Retrieve the text of the line containing the caret. -- Also returns the index of the caret on the line. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @return string, number function buffer.get_cur_line(buffer) end --- -- Get the back color for active hotspots in 0xBBGGRR format. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @return number function buffer.get_hotspot_active_back(buffer) end --- -- Get the fore color for active hotspots. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @return number function buffer.get_hotspot_active_fore(buffer) end --- -- Find the last child line of a header line. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param header_line The line number of a header line. -- @param level The level or -1 for the level of header_line. function buffer.get_last_child(buffer, header_line, level) end --- -- Retrieve the name of the lexer. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.get_lexer_language(buffer) end --- -- Retrieve the contents of a line. -- Also returns the length of the line. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param line The line number. -- @return string, number function buffer.get_line(buffer, line) end @@ -1129,20 +1128,20 @@ function buffer.get_line(buffer, line) end --- -- Retrieve the position of the end of the selection at the given line (-1 if no -- selection on this line). --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param line The line number. function buffer.get_line_sel_end_position(buffer, line) end --- -- Retrieve the position of the start of the selection at the given line (-1 if -- no selection on this line). --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param line The line number. function buffer.get_line_sel_start_position(buffer, line) end --- -- Retrieve a "property" value previously set with `buffer.property`. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param key Keyword. -- @return string function buffer.get_property(buffer, key) end @@ -1150,7 +1149,7 @@ function buffer.get_property(buffer, key) end --- -- Retrieve a "property" value previously set with `buffer.property`, with "$()" -- variable replacement on returned buffer. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param key Keyword. -- @return string function buffer.get_property_expanded(buffer, key) end @@ -1158,13 +1157,13 @@ function buffer.get_property_expanded(buffer, key) end --- -- Retrieve the selected text. -- Also returns the length of the text. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @return string, number function buffer.get_sel_text(buffer) end --- -- Retrieve the value of a tag from a regular expression search. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param tag_num The tag number. -- @return string function buffer.get_tag(buffer, tag_num) end @@ -1172,100 +1171,100 @@ function buffer.get_tag(buffer, tag_num) end --- -- Retrieve all the text in the document. -- Also returns number of characters retrieved. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.get_text(buffer) end --- -- Set caret to start of a line and ensure it is visible. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param line The line number. function buffer.goto_line(buffer, line) end --- -- Set caret to a position and ensure it is visible. -- The anchor position is set the same as the current position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param pos The position. function buffer.goto_pos(buffer, pos) end --- -- Set the focus to this view. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.grab_focus(buffer) end --- -- Make a range of lines invisible. -- This has no effect on fold levels or fold flags. start_line can not be -- hidden. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param start_line The start line. -- @param end_line The end line. function buffer.hide_lines(buffer, start_line, end_line) end --- -- Draw the selection in normal style or with selection highlighted. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param normal Draw normal selection. function buffer.hide_selection(buffer, normal) end --- -- Move caret to first position on line. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.home(buffer) end --- -- Move caret to first position on display line. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.home_display(buffer) end --- -- Move caret to first position on display line extending selection to new caret -- position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.home_display_extend(buffer) end --- -- Move caret to first position on line extending selection to new caret -- position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.home_extend(buffer) end --- -- Move caret to first position on line, extending rectangular selection to new -- caret position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.home_rect_extend(buffer) end --- -- Move caret to the start of the display line when word-wrap is enabled. -- If already there, go to the start of the document line. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.home_wrap(buffer) end --- -- Like `buffer:home_wrap()` but extending selection to new caret position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.home_wrap_extend(buffer) end --- -- Retrieve a bitmap value representing which indicators are non-zero at a -- position. -- Bit 0 is set if indicator 0 is present, bit 1 for indicator 1 and so on. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param pos The position. -- @return number function buffer.indicator_all_on_for(buffer, pos) end --- -- Turn a indicator off over a range. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param pos The start position. -- @param clear_length The length. function buffer.indicator_clear_range(buffer, pos, clear_length) end --- -- Find the position where a particular indicator ends. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param indicator An indicator number in the range of 0 to 31. -- @param pos The position of the indicator. function buffer.indicator_end(buffer, indicator, pos) end @@ -1273,14 +1272,14 @@ function buffer.indicator_end(buffer, indicator, pos) end --- -- Turn a indicator on over a range. -- This function fills with the current indicator value. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param pos the start position. -- @param fill_length The length. function buffer.indicator_fill_range(buffer, pos, fill_length) end --- -- Find the position where a particular indicator starts. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param indicator An indicator number in the range of 0 to 31. -- @param pos The position of the indicator. function buffer.indicator_start(buffer, indicator, pos) end @@ -1288,7 +1287,7 @@ function buffer.indicator_start(buffer, indicator, pos) end --- -- Retrieve the value of a particular indicator at a position. -- Currently all values are drawn the same. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param indicator The indicator number in the range of 0 to 31. -- @param pos The position. -- @return number @@ -1298,89 +1297,89 @@ function buffer.indicator_value_at(buffer, indicator, pos) end -- Insert string at a position. -- If the current position is after the insertion point then it is moved along -- with its surrounding text but no scrolling is performed. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param pos The position to insert text at or -1 for the current position. -- @param text The text to insert. function buffer.insert_text(buffer, pos, text) end --- -- Copy the line containing the caret. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.line_copy(buffer) end --- -- Cut the line containing the caret. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.line_cut(buffer) end --- -- Delete the line containing the caret. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.line_delete(buffer) end --- -- Move caret down one line. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.line_down(buffer) end --- -- Move caret down one line extending selection to new caret position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.line_down_extend(buffer) end --- -- Move caret down one line, extending rectangular selection to new caret -- position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.line_down_rect_extend(buffer) end --- -- Duplicate the current line. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.line_duplicate(buffer) end --- -- Move caret to last position on line. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.line_end(buffer) end --- -- Move caret to last position on display line. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.line_end_display(buffer) end --- -- Move caret to last position on display line extending selection to new caret -- position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.line_end_display_extend(buffer) end --- -- Move caret to last position on line extending selection to new caret -- position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.line_end_extend(buffer) end --- -- Move caret to last position on line, extending rectangular selection to new -- caret position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.line_end_rect_extend(buffer) end --- -- Move caret to the end of the display line when word-wrap is enabled. -- If already there, go to the end of the document line. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.line_end_wrap(buffer) end --- -- Like `buffer:line_end_wrap()` but extending selection to new caret position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.line_end_wrap_extend(buffer) end --- -- Retrieve the line containing a position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param pos The position. -- @return number function buffer.line_from_position(buffer, pos) end @@ -1389,91 +1388,91 @@ function buffer.line_from_position(buffer, pos) end -- Returns how many characters are on a line, including end of line characters. -- To get the length of the line not including any end of line characters, use -- `buffer.line_end_position[line] - buffer:position_from_line(line)`. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param line The line number. -- @return number function buffer.line_length(buffer, line) end --- -- Scroll horizontally and vertically. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param columns The number of columns to scroll horizontally. -- @param lines The number of lines to scroll vertically. function buffer.line_scroll(buffer, columns, lines) end --- -- Scroll the document down, keeping the caret visible. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.line_scroll_down(buffer) end --- -- Scroll the document up, keeping the caret visible. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.line_scroll_up(buffer) end --- -- Switch the current line with the previous. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.line_transpose(buffer) end --- -- Move caret up one line. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.line_up(buffer) end --- -- Move caret up one line extending selection to new caret position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.line_up_extend(buffer) end --- -- Move caret up one line, extending rectangular selection to new caret -- position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.line_up_rect_extend(buffer) end --- -- Join the lines in the target. -- Where this would lead to no space between words, an extra space is inserted. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.lines_join(buffer) end --- -- Split the lines in the target into lines that are less wide than pixel_width -- where possible. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param pixel_width The pixel width. When 0, the width of the view is used. function buffer.lines_split(buffer, pixel_width) end --- -- Transform the selection to lower case. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.lower_case(buffer) end --- -- Get the text in the text margin for a line. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param line The line number. -- @return string function buffer.margin_get_text(buffer, line) end --- -- Set the text in the text margin for a line. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param line The line number. -- @param text The text. function buffer.margin_set_text(buffer, line, text) end --- -- Clear the margin text on all lines. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.margin_text_clear_all(buffer) end --- -- Add a marker to a line, returning an ID which can be used to find or delete -- the marker. -- Returns -1 if this fails (illegal line number, out of memory). --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param line The line number. -- @param marker_num A marker number in the range of 0 to 31. -- @return number @@ -1481,7 +1480,7 @@ function buffer.marker_add(buffer, line, marker_num) end --- -- Add a set of markers to a line. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param line The line number. -- @param marker_mask A mask of markers to set. Set bit 0 to set marker 0, bit -- 1 for marker 1 and so on. @@ -1489,7 +1488,7 @@ function buffer.marker_add_set(buffer, line, marker_mask) end --- -- Set the symbol used for a particular marker number. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param marker_num A marker number in the range of 0 to 31. -- @param marker_symbol A marker symbol: _SCINTILLA.constants.SC_MARK_*. -- @see _SCINTILLA.next_marker_number @@ -1497,7 +1496,7 @@ function buffer.marker_define(buffer, marker_num, marker_symbol) end --- -- Define a marker from a pixmap. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param marker_num A marker number in the range of 0 to 31. -- @param pixmap Null-terminated pixmap data. function buffer.marker_define_pixmap(buffer, marker_num, pixmap) end @@ -1506,7 +1505,7 @@ function buffer.marker_define_pixmap(buffer, marker_num, pixmap) end -- Define a marker from RGBA data. -- It has the width and height from `buffer.rgba_image_width` and -- `buffer.rgba_image_height`. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param marker_num A marker number in the range of 0 to 31. -- @param pixels A sequence of 4 byte pixel values starting with the pixels for -- the top line, with the leftmost pixel first, then continuing with the @@ -1519,7 +1518,7 @@ function buffer.marker_define_rgba_image(buffer, marker_num, pixels) end --- -- Delete a marker from a line. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param line The line number. -- @param marker_num A marker number in the range of 0 to 31 or -1 to delete all -- markers from the line. @@ -1527,28 +1526,28 @@ function buffer.marker_delete(buffer, line, marker_num) end --- -- Delete all markers with a particular number from all lines. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param marker_num A marker number in the range of 0 to 31 or -1 to delete all -- markers from all lines. function buffer.marker_delete_all(buffer, marker_num) end --- -- Delete a marker. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param handle The identifier of a marker returned by buffer:marker_add(). function buffer.marker_delete_handle(buffer, handle) end --- -- Enable/disable highlight for current folding block (smallest one that -- contains the caret) --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param enabled function buffer.marker_enable_highlight(buffer, enabled) end --- -- Get a bit mask of all the markers set on a line. -- Bit 0 is set if marker 0 is present, bit 1 for marker 1 and so on. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param line The line number. -- @return number. function buffer.marker_get(buffer, line) end @@ -1556,7 +1555,7 @@ function buffer.marker_get(buffer, line) end --- -- Retrieve the line number at which a particular marker is located. -- Returns -1 if it not found. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param handle The identifier of a marker returned by buffer:marker_add(). -- @return number function buffer.marker_line_from_handle(buffer, handle) end @@ -1564,7 +1563,7 @@ function buffer.marker_line_from_handle(buffer, handle) end --- -- Find the next line at or after start_line that includes a marker in mask. -- Return -1 when no more lines. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param start_line The start line. -- @param marker_mask A mask of markers to find. Set bit 0 to find marker 0, bit -- 1 for marker 1 and so on. @@ -1573,7 +1572,7 @@ function buffer.marker_next(buffer, start_line, marker_mask) end --- -- Find the previous line before lineStart that includes a marker in mask. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param start_line The start line. -- @param marker_mask A mask of markers to find. Set bit 0 to find marker 0, bit -- 1 for marker 1 and so on. @@ -1583,7 +1582,7 @@ function buffer.marker_previous(buffer, start_line, marker_mask) end --- -- Set the alpha used for a marker that is drawn in the text area, not the -- margin. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param marker_num A marker number in the range of 0 to 31. -- @param alpha An alpha value between 0 (transparent) and 255 (opaque), or 256 -- for no alpha. @@ -1591,7 +1590,7 @@ function buffer.marker_set_alpha(buffer, marker_num, alpha) end --- -- Set the background color used for a particular marker number. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param marker_num A marker number in the range of 0 to 31. -- @param color A color in 0xBBGGRR format. function buffer.marker_set_back(buffer, marker_num, color) end @@ -1599,21 +1598,21 @@ function buffer.marker_set_back(buffer, marker_num, color) end --- -- Set the background color used for a particular marker number when its -- folding block is selected. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param marker_num A marker number in the range of 0 to 31. -- @param color A color in 0xBBGGRR format. The default color is #FF0000. function buffer.marker_set_back_selected(buffer, marker_num, color) end --- -- Set the foreground color used for a particular marker number. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param marker_num A marker number in the range of 0 to 31. -- @param color A color in 0xBBGGRR format. function buffer.marker_set_fore(buffer, marker_num, color) end --- -- Return the symbol defined for marker_num with `buffer:marker_define()`. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param marker_num A marker number in the range of 0 to 31. -- @return number function buffer.marker_symbol_defined(buffer, marker_num) end @@ -1621,7 +1620,7 @@ function buffer.marker_symbol_defined(buffer, marker_num) end --- -- Move the caret inside current view if it's not there already. -- Any selection is lost. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.move_caret_inside_view(buffer) end --- @@ -1630,7 +1629,7 @@ function buffer.move_caret_inside_view(buffer) end -- The selection will be automatically extended to the beginning of the -- selection's first line and the end of the seletion's last line. If nothing -- was selected, the line the cursor is currently at will be selected. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.move_selected_lines_down(buffer) end --- @@ -1639,77 +1638,77 @@ function buffer.move_selected_lines_down(buffer) end -- The selection will be automatically extended to the beginning of the -- selection's first line and the end of the seletion's last line. If nothing -- was selected, the line the cursor is currently at will be selected. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.move_selected_lines_up(buffer) end --- -- Insert a new line, may use a CRLF, CR or LF depending on EOL mode. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.new_line(buffer) end --- -- Move caret one page down. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.page_down(buffer) end --- -- Move caret one page down extending selection to new caret position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.page_down_extend(buffer) end --- -- Move caret one page down, extending rectangular selection to new caret -- position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.page_down_rect_extend(buffer) end --- -- Move caret one page up. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.page_up(buffer) end --- -- Move caret one page up extending selection to new caret position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.page_up_extend(buffer) end --- -- Move caret one page up, extending rectangular selection to new caret -- position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.page_up_rect_extend(buffer) end --- -- Move caret one paragraph down (delimited by empty lines). --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.para_down(buffer) end --- -- Move caret one paragraph down (delimited by empty lines) extending selection -- to new caret position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.para_down_extend(buffer) end --- -- Move caret one paragraph up (delimited by empty lines). --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.para_up(buffer) end --- -- Move caret one paragraph up (delimited by empty lines) extending selection to -- new caret position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.para_up_extend(buffer) end --- -- Paste the contents of the clipboard into the document replacing the -- selection. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.paste(buffer) end --- -- For private communication between an application and a known lexer. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param operation An operation number. -- @param data Number data. function buffer.private_lexer_call(buffer, operation, data) end @@ -1717,7 +1716,7 @@ function buffer.private_lexer_call(buffer, operation, data) end --- -- Retrieve the x value of the point in the window where a position is -- displayed. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param pos The position. -- @return number function buffer.point_x_from_position(buffer, pos) end @@ -1725,7 +1724,7 @@ function buffer.point_x_from_position(buffer, pos) end --- -- Retrieve the y value of the point in the window where a position is -- displayed. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param pos The position. -- @return number function buffer.point_y_from_position(buffer, pos) end @@ -1733,14 +1732,14 @@ function buffer.point_y_from_position(buffer, pos) end --- -- Given a valid document position, return the next position taking code page -- into account. Maximum value returned is the last position in the document. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param pos The position. function buffer.position_after(buffer, pos) end --- -- Given a valid document position, return the previous position taking code -- page into account. Returns 0 if passed 0. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param pos The position. -- @return number function buffer.position_before(buffer, pos) end @@ -1748,14 +1747,14 @@ function buffer.position_before(buffer, pos) end --- -- Retrieve the position at the start of a line. -- If line is greater than the lines in the document, returns -1. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param line The line. -- @return number function buffer.position_from_line(buffer, line) end --- -- Find the position from a point within the window. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param x -- @param y -- @return number @@ -1764,7 +1763,7 @@ function buffer.position_from_point(buffer, x, y) end --- -- Returns the position from a point within the window, but return -1 if not -- close to text. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param x -- @param y -- @return number @@ -1772,12 +1771,12 @@ function buffer.position_from_point_close(buffer, x, y) end --- -- Redoes the next action on the undo history. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.redo(buffer) end --- -- Register an XPM image for use in autocompletion lists. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param type Integer type to register the image with. -- @param xpm_data XPM data as is described for buffer:marker_define_pixmap(). function buffer.register_image(buffer, type, xpm_data) end @@ -1786,7 +1785,7 @@ function buffer.register_image(buffer, type, xpm_data) end -- Register an RGBA image for use in autocompletion lists. -- It has the width and height from `buffer.rgba_image_width` and -- `buffer.rgba_image_height`. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param type Integer type to register the image with. -- @param pixels RGBA data as is described for -- buffer:marker_define_rgba_image(). @@ -1796,7 +1795,7 @@ function buffer.register_rgba_image(buffer, type, pixels) end -- Replace the selected text with the argument text. -- The caret is positioned after the inserted text and the caret is scrolled -- into view. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param text The text. function buffer.replace_sel(buffer, text) end @@ -1804,7 +1803,7 @@ function buffer.replace_sel(buffer, text) end -- Replace the target text with the argument text. -- After replacement, the target range refers to the replacement text. -- Returns the length of the replacement text. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param text The text (can contain NULs). -- @return number function buffer.replace_target(buffer, text) end @@ -1815,43 +1814,43 @@ function buffer.replace_target(buffer, text) end -- matched in the last search operation which were surrounded by \( and \). -- Returns the length of the replacement text including any change caused by -- processing the \d patterns. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param text The text (can contain NULs). -- @return number function buffer.replace_target_re(buffer, text) end --- -- Set the main selection to the next selection. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.rotate_selection(buffer) end --- -- Ensure the caret is visible. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.scroll_caret(buffer) end --- -- Scroll to end of document. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.scroll_to_end(buffer) end --- -- Scroll to start of document. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.scroll_to_start(buffer) end --- -- Sets the current caret position to be the search anchor. -- Always call this before calling either of `buffer:search_next()` or -- `buffer:search_prev()`. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.search_anchor(buffer) end --- -- Search for a counted string in the target and set the target to the found -- range. -- Returns length of range or -1 for failure in which case target is not moved. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param text The text (can contain NULs). -- @return number function buffer.search_in_target(buffer, text) end @@ -1861,7 +1860,7 @@ function buffer.search_in_target(buffer, text) end -- The return value is -1 if nothing is found, otherwise the return value is the -- start position of the matching text. The selection is updated to show the -- matched text, but is not scrolled into view. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param flags Search flags. See `buffer.search_flags`. -- @param text The text. -- @return number @@ -1872,7 +1871,7 @@ function buffer.search_next(buffer, flags, text) end -- The return value is -1 if nothing is found, otherwise the return value is the -- start position of the matching text. The selection is updated to show the -- matched text, but is not scrolled into view. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param flags Search flags. See `buffer.search_flags`. -- @param text The text. -- @return number @@ -1881,13 +1880,13 @@ function buffer.search_prev(buffer, flags, text) end --- -- Select all the text in the document. -- The current position is not scrolled into view. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.select_all(buffer) end --- -- Duplicate the selection. -- If selection empty duplicate the line containing the caret. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.selection_duplicate(buffer) end --- @@ -1895,7 +1894,7 @@ function buffer.selection_duplicate(buffer) end -- defaults. -- This sets whitespace to space, tab and other characters with codes less than -- 0x20, with word characters set to alphanumeric and '_'. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.set_chars_default(buffer) end --- @@ -1907,7 +1906,7 @@ function buffer.set_empty_selection(buffer, pos) end --- -- Set some style options for folding. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param flags Mask of fold flags. Flags available are -- `_SCINTILLA.constants.SC_FOLDFLAG_LINEBEFORE_EXPANDED` (2): Draw above if -- expanded; `_SCINTILLA.constants.SC_FOLDFLAG_LINEBEFORE_CONTRACTED` (4): @@ -1919,54 +1918,54 @@ function buffer.set_fold_flags(buffer, flags) end --- -- Set the colors used as a chequerboard pattern in the fold margin. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param use_setting Enable color change. -- @param color A color in 0xBBGGRR format. function buffer.set_fold_margin_colour(buffer, use_setting, color) end --- -- Set the colors used as a chequerboard pattern in the fold margin. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param use_setting Enable color change. -- @param color A color in 0xBBGGRR format. function buffer.set_fold_margin_hi_colour(buffer, use_setting, color) end --- -- Set a back color for active hotspots. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param use_setting Enable the color change. -- @param color A color in 0xBBGGRR format. function buffer.set_hotspot_active_back(buffer, use_setting, color) end --- -- Set a fore color for active hotspots. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param use_setting Enable the color change. -- @param color A color in 0xBBGGRR format. function buffer.set_hotspot_active_fore(buffer, use_setting, color) end --- -- Set the length of the utf8 argument for calling `buffer:encoded_from_utf8()`. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param bytes Bytes or -1 for measuring to first nul. function buffer.set_length_for_encode(buffer, bytes) end --- -- Set the lexing language of the document based on string name. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param language_name The language name. function buffer.set_lexer_language(buffer, language_name) end --- -- Remember the current position in the undo history as the position at which -- the document was saved. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.set_save_point(buffer) end --- -- Select a range of text. -- The caret is scrolled into view after this operation. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param start_pos Start position. If negative, it means the end of the -- document. -- @param end_pos End position. If negative, it means remove any selection (i.e. @@ -1976,7 +1975,7 @@ function buffer.set_sel(buffer, start_pos, end_pos) end --- -- Set the background color of the main and additional selections and whether to -- use this setting. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param use_setting Enable color change. -- @param color A color in 0xBBGGRR format. function buffer.set_sel_back(buffer, use_setting, color) end @@ -1984,14 +1983,14 @@ function buffer.set_sel_back(buffer, use_setting, color) end --- -- Set the foreground color of the main and additional selections and whether -- to use this setting. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param use_setting Enable color change. -- @param color A color in 0xBBGGRR format. function buffer.set_sel_fore(buffer, use_setting, color) end --- -- Set a simple selection from anchor to caret. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param caret The caret. -- @param anchor The anchor. function buffer.set_selection(buffer, caret, anchor) end @@ -1999,14 +1998,14 @@ function buffer.set_selection(buffer, caret, anchor) end --- -- Change style from current styling position for length characters to a style -- and move the current styling position to after this newly styled segment. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param length The length to style. -- @param style The style number to set. function buffer.set_styling(buffer, length, style) end --- -- Replace the contents of the document with the argument text. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param text The text. function buffer.set_text(buffer, text) end @@ -2014,7 +2013,7 @@ function buffer.set_text(buffer, text) end -- Set the way the display area is determined when a particular line is to be -- moved to by `buffer:goto_line()`, etc. -- It is similar in operation to `buffer:set_y_caret_policy()`. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param visible_policy A combination of `_SCINTILLA.constants.VISIBLE_SLOP`, -- (0x01) and `_SCINTILLA.constants.VISIBLE_STRICT` (0x04). -- @param visible_slop The slop value. @@ -2022,14 +2021,14 @@ function buffer.set_visible_policy(buffer, visible_policy, visible_slop) end --- -- Set the background color of all whitespace and whether to use this setting. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param use_setting Enable color change. -- @param color A color in 0xBBGGRR format. function buffer.set_whitespace_back(buffer, use_setting, color) end --- -- Set the foreground color of all whitespace and whether to use this setting. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param use_setting Enable color change. -- @param color A color in 0xBBGGRR format. function buffer.set_whitespace_fore(buffer, use_setting, color) end @@ -2037,7 +2036,7 @@ function buffer.set_whitespace_fore(buffer, use_setting, color) end --- -- Set the way the caret is kept visible when going sideway. -- The exclusion zone is given in pixels. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param caret_policy A combination of `_SCINTILLA.constants.CARET_SLOP` -- (0x01), `_SCINTILLA.constants.CARET_STRICT` (0x04), -- `_SCINTILLA.constants.CARET_JUMPS` (0x10), and @@ -2047,7 +2046,7 @@ function buffer.set_x_caret_policy(buffer, caret_policy, caret_slop) end --- -- Set the way the line the caret is on is kept visible. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param caret_policy A combination of `_SCINTILLA.constants.CARET_SLOP` -- (0x01), `_SCINTILLA.constants.CARET_STRICT` (0x04), -- `_SCINTILLA.constants.CARET_JUMPS` (0x10), and @@ -2059,94 +2058,94 @@ function buffer.set_y_caret_policy(buffer, caret_policy, caret_slop) end -- Make a range of lines visible. -- This has no effect on fold levels or fold flags. start_line can not be -- hidden. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param start_line The start line. -- @param end_line The end line. function buffer.show_lines(buffer, start_line, end_line) end --- -- Start notifying the container of all key presses and commands. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.start_record(buffer) end --- -- Set the current styling position to pos and the styling mask to mask. -- The styling mask can be used to protect some bits in each styling byte from -- modification. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param position The styling position. -- @param mask The bit mask of the style bytes that can be set. function buffer.start_styling(buffer, position, mask) end --- -- Stop notifying the container of all key presses and commands. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.stop_record(buffer) end --- -- Move caret to bottom of page, or one page down if already at bottom of page. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.stuttered_page_down(buffer) end --- -- Move caret to bottom of page, or one page down if already at bottom of page, -- extending selection to new caret position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.stuttered_page_down_extend(buffer) end --- -- Move caret to top of page, or one page up if already at top of page. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.stuttered_page_up(buffer) end --- -- Move caret to top of page, or one page up if already at top of page, -- extending selection to new caret position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.stuttered_page_up_extend(buffer) end --- -- Clear all the styles and make equivalent to the global default style. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.style_clear_all(buffer) end --- -- Returns the font name of a given style. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param style_num The style number. -- @return string function buffer.style_get_font(buffer, style_num) end --- -- Reset the default style to its state at startup. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.style_reset_default(buffer) end --- -- Swap that caret and anchor of the main selection. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.swap_main_anchor_caret(buffer) end --- -- If selection is empty or all on one line replace the selection with a tab -- character, or if more than one line selected, indent the lines. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.tab(buffer) end --- -- Returns the target converted to UTF8. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.target_as_utf8(buffer) end --- -- Make the target range start and end be the same as the selection range start -- and end. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.target_from_selection(buffer) end --- -- Retrieve the height of a particular line of text in pixels. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param line The line number. -- @return number function buffer.text_height(buffer, line) end @@ -2154,7 +2153,7 @@ function buffer.text_height(buffer, line) end --- -- Measure the pixel width of some text in a particular style. -- Does not handle tab or control characters. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param style_num The style number. -- @param text The text. -- @return number @@ -2163,35 +2162,35 @@ function buffer.text_width(buffer, style_num, text) end --- -- Switch between sticky and non-sticky: meant to be bound to a key. -- See `buffer.caret_sticky`. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.toggle_caret_sticky(buffer) end --- -- Switch a header line between expanded and contracted. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param line The line number. function buffer.toggle_fold(buffer, line) end --- -- Undo one action in the undo history. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.undo(buffer) end --- -- Transform the selection to upper case. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.upper_case(buffer) end --- -- Sets whether a pop up menu is displayed automatically when the user presses -- the wrong mouse button. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param allow_popup Allow popup menu. function buffer.use_pop_up(buffer, allow_popup) end --- -- Display a list of strings and send notification when user chooses one. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param list_type A list identifier number greater than zero. -- @param item_list List of words separated by separator characters (initially -- spaces). @@ -2201,50 +2200,50 @@ function buffer.user_list_show(buffer, list_type, item_list) end --- -- Move caret to before first visible character on line. -- If already there move to first character on line. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.vc_home(buffer) end --- -- Like `buffer:vc_home()` but extending selection to new caret position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.vc_home_extend(buffer) end --- -- Move caret to before first visible character on line. -- If already there move to first character on line. In either case, extend -- rectangular selection to new caret position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.vc_home_rect_extend(buffer) end --- -- Move caret to before first visible character on display line when word-wrap -- is enabled. -- If already there, go to first character on display line. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.vc_home_wrap(buffer) end --- -- Like `buffer:vc_home_wrap()` but extending selection to new caret position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.vc_home_wrap_extend(buffer) end --- -- Center current line in window. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.vertical_centre_caret(buffer) end --- -- Find the display line of a document line taking hidden lines into account. -- If there is folding and line is outside the range of lines in the document, -- the return value is -1. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param line The line number. -- @return number function buffer.visible_from_doc_line(buffer, line) end --- -- Get position of end of word. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param pos The position. -- @param only_word_chars If `true`, stops searching at the first non-word -- character in the search direction. Otherwise, the first character in the @@ -2255,71 +2254,71 @@ function buffer.word_end_position(buffer, pos, only_word_chars) end --- -- Move caret left one word. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.word_left(buffer) end --- -- Move caret left one word, position cursor at end of word. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.word_left_end(buffer) end --- -- Move caret left one word, position cursor at end of word, extending selection -- to new caret position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.word_left_end_extend(buffer) end --- -- Move caret left one word extending selection to new caret position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.word_left_extend(buffer) end --- -- Move to the previous change in capitalisation or underscores. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.word_part_left(buffer) end --- -- Move to the previous change in capitalisation or underscores extending -- selection to new caret position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.word_part_left_extend(buffer) end --- -- Move to the next change in capitalisation or underscores. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.word_part_right(buffer) end --- -- Move to the next change in capitalisation or underscores extending selection -- to new caret position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.word_part_right_extend(buffer) end --- -- Move caret right one word. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.word_right(buffer) end --- -- Move caret right one word, position cursor at end of word. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.word_right_end(buffer) end --- -- Move caret right one word, position cursor at end of word, extending -- selection to new caret position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.word_right_end_extend(buffer) end --- -- Move caret right one word extending selection to new caret position. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.word_right_extend(buffer) end --- -- Get position of start of word. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param pos The position. -- @param only_word_chars If `true`, stops searching at the first non-word -- character in the search direction. Otherwise, the first character in the @@ -2330,7 +2329,7 @@ function buffer.word_start_position(buffer, pos, only_word_chars) end --- -- Returns the number of display lines needed to wrap a document line. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param line The line number. -- @return number function buffer.wrap_count(buffer, line) end @@ -2338,40 +2337,49 @@ function buffer.wrap_count(buffer, line) end --- -- Magnify the displayed text by increasing the sizes by 1 point if the current -- zoom factor is less than 20 points. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.zoom_in(buffer) end --- -- Make the displayed text smaller by decreasing the sizes by 1 point if the -- current zoom factor is greater than -10 points. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.zoom_out(buffer) end -- External functions. --- --- Gets a range of text from the current buffer. --- @param buffer The currently focused buffer. --- @param start_pos The beginning position of the range of text to get. --- @param end_pos The end position of the range of text to get. -function buffer.text_range(buffer, start_pos, end_pos) end +-- Checks whether the given buffer is the global one. +-- If not, throws an error indicating so. It is necessary to call this at the +-- top of all buffer functions to avoid unexpected behavior since most buffer +-- functions operate on the global 'buffer', which is not necessarily the given +-- one. +-- @param buffer The buffer to check. +function buffer.check_global(buffer) end --- -- Deletes the current buffer. -- WARNING: this function should NOT be called via scripts. io provides a -- close() function for buffers to prompt for confirmation if necessary; this -- function does not. Activates the 'buffer_deleted' signal. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.delete(buffer) end --- +-- Gets a range of text from the current buffer. +-- @param buffer The global buffer. +-- @param start_pos The beginning position of the range of text to get. +-- @param end_pos The end position of the range of text to get. +function buffer.text_range(buffer, start_pos, end_pos) end + +--- -- Reloads the file in a given buffer. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.reload(buffer) end --- -- Sets the encoding for the buffer, converting its contents in the process. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param encoding The encoding to set. Valid encodings are ones that GTK's -- g_convert() function accepts (typically GNU iconv's encodings). -- @usage buffer.set_encoding(buffer, 'ASCII') @@ -2379,19 +2387,19 @@ function buffer.set_encoding(buffer) end --- -- Saves the current buffer to a file. --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.save(buffer) end --- -- Saves the current buffer to a file different than its filename property. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param utf8_filename The new filepath to save the buffer to. Must be UTF-8 -- encoded. function buffer.save_as(buffer) end --- -- Closes the current buffer. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- If the buffer is dirty, the user is prompted to continue. The buffer is not -- saved automatically. It must be done manually. function buffer.close(buffer) end @@ -2402,25 +2410,26 @@ function buffer.close(buffer) end -- mime-types tables. Also if the user manually sets the lexer, it should be -- restored. -- Loads the language-specific module if it exists. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param lang The string language to set. -- @usage buffer.set_lexer(buffer, 'language_name') function buffer.set_lexer(buffer, lang) end --- -- Replacement for buffer.get_lexer_language(buffer). --- @param buffer The focused buffer. +-- @param buffer The global buffer. function buffer.get_lexer(buffer) end --- -- Returns the name of the style associated with a style number. --- @param buffer The focused buffer. +-- @param buffer The global buffer. -- @param style_num A style number in the range 0 <= style_num < 256. -- @see buffer.style_at function buffer.get_style_name(buffer, style_num) end -- Unused Fields. -- * use_palette +-- * doc_pointer -- * mod_event_mask -- * paste_convert_endings -- * character_pointer |