aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/._M.luadoc2
-rw-r--r--core/.buffer.luadoc1362
-rw-r--r--core/.iconv.luadoc2
-rw-r--r--core/.os.luadoc2
-rw-r--r--core/.ui.dialogs.luadoc2
-rw-r--r--core/.view.luadoc1365
-rw-r--r--core/events.lua38
-rw-r--r--core/file_io.lua8
-rw-r--r--core/iface.lua12
-rw-r--r--core/ui.lua66
10 files changed, 1445 insertions, 1414 deletions
diff --git a/core/._M.luadoc b/core/._M.luadoc
index 80b127cd..479b88bb 100644
--- a/core/._M.luadoc
+++ b/core/._M.luadoc
@@ -68,7 +68,7 @@
-- if lexer ~= 'python' then return end
-- buffer.tab_width = 4
-- buffer.use_tabs = false
--- buffer.view_ws = buffer.WS_VISIBLEALWAYS
+-- view.view_ws = view.WS_VISIBLEALWAYS
-- end
--
-- ## Autocompletion and Documentation
diff --git a/core/.buffer.luadoc b/core/.buffer.luadoc
index 969c45ac..b0618699 100644
--- a/core/.buffer.luadoc
+++ b/core/.buffer.luadoc
@@ -1,4 +1,4 @@
--- Copyright 2007-2018 Mitchell mitchell.att.foicica.com. See LICENSE.
+-- Copyright 2007-2020 Mitchell mitchell.att.foicica.com. See LICENSE.
-- This is a DUMMY FILE used for making LuaDoc for Buffers.
---
@@ -6,33 +6,17 @@
-- Constants are documented in the fields they apply to.
-- While you can work with individual buffer instances, it is really only useful
-- to work with the global one.
--- Many of these functions and fields are derived from the Scintilla editing
--- component, and additional information can be found on the Scintilla website:
+-- Many of these functions and fields are derived from buffer-specific
+-- functionality of the Scintilla editing component, and additional information
+-- can be found on the Scintilla website:
-- [http://scintilla.org/ScintillaDoc.html](
--- http://scintilla.org/ScintillaDoc.html)
--- @field additional_caret_fore (number)
--- The foreground color, in "0xBBGGRR" format, of additional carets.
--- @field additional_carets_blink (bool)
--- Allow additional carets to blink.
--- The default value is `true`.
--- @field additional_carets_visible (bool)
--- Display additional carets.
--- The default value is `true`.
--- @field additional_sel_alpha (number)
--- The alpha value, ranging from `0` (transparent) to `255` (opaque), of
--- additional selections.
--- The default value is `buffer.ALPHA_NOALPHA`, for no alpha.
--- @field additional_sel_back (number, Write-only)
--- The background color, in "0xBBGGRR" format, of additional selections.
--- This field has no effect when calling `buffer.set_sel_back(false, ...)`.
--- @field additional_sel_fore (number, Write-only)
--- The foreground color, in "0xBBGGRR" format, of additional selections.
--- This field has no effect when calling `buffer.set_sel_fore(false, ...)`.
+-- http://scintilla.org/ScintillaDoc.html).
+-- Note that with regard to Scintilla-specific functionality, this API is a
+-- _suggestion_, not a hard requirement. All of that functionality also exists
+-- in [`view`](), even if undocumented.
-- @field additional_selection_typing (bool)
-- Type into multiple selections.
-- The default value is `false`.
--- @field all_lines_visible (bool, Read-only)
--- Whether or not all lines are visible.
-- @field anchor (number)
-- The anchor's position.
-- @field annotation_lines (table, Read-only)
@@ -43,20 +27,6 @@
-- size/size_fractional, bold/weight, italics, fore, back, and character_set.
-- @field annotation_text (table)
-- Table of annotation text per line number.
--- @field annotation_visible (number)
--- The annotation visibility mode.
---
--- * `buffer.ANNOTATION_HIDDEN`
--- Annotations are invisible.
--- * `buffer.ANNOTATION_STANDARD`
--- Draw annotations left-justified with no decoration.
--- * `buffer.ANNOTATION_BOXED`
--- Indent annotations to match the annotated text and outline them with a
--- box.
--- * `buffer.ANNOTATION_INDENTED`
--- Indent non-decorated annotations to match the annotated text.
---
--- The default value is `buffer.ANNOTATION_HIDDEN`.
-- @field auto_c_auto_hide (bool)
-- Automatically cancel an autocompletion or user list when no entries match
-- typed text.
@@ -94,14 +64,6 @@
-- @field auto_c_ignore_case (bool)
-- Ignore case when searching an autocompletion or user list for matches.
-- The default value is `false`.
--- @field auto_c_max_height (number)
--- The maximum number of items per page to show in autocompletion and user
--- lists. The default value is `5`.
--- @field auto_c_max_width (number)
--- The maximum number of characters per item to show in autocompletion and
--- user lists.
--- The default value is `0`, which automatically sizes the width to fit the
--- longest item.
-- @field auto_c_multi (number)
-- The multiple selection autocomplete mode.
--
@@ -131,51 +93,15 @@
-- The character byte that separates autocompletion and user list items and
-- their image types.
-- Autocompletion and user list items can display both an image and text.
--- Register images and their types using [`buffer.register_image()`]() or
--- [`buffer.register_rgba_image()`]() before appending image types to list
+-- Register images and their types using [`view.register_image()`]() or
+-- [`view.register_rgba_image()`]() before appending image types to list
-- items after type separator characters.
-- The default value is 63 ('?').
-- @field back_space_un_indents (bool)
-- Un-indent text when backspacing within indentation.
-- The default value is `false`.
--- @field call_tip_fore_hlt (number, Write-only)
--- A call tip's highlighted text foreground color, in "0xBBGGRR" format.
-- @field call_tip_pos_start (number, Write-only)
-- The position in which backspacing beyond it hides a visible call tip.
--- @field call_tip_position (boolean)
--- Display a call tip above the current line instead of below it.
--- The default value is `false`.
--- @field call_tip_use_style (number)
--- The pixel width of tab characters in call tips.
--- When non-zero, also enables the use of style number `buffer.STYLE_CALLTIP`
--- instead of `buffer.STYLE_DEFAULT` for call tip styles.
--- The default value is `0`.
--- @field caret_fore (number)
--- The caret's foreground color, in "0xBBGGRR" format.
--- @field caret_line_back (number)
--- The background color, in "0xBBGGRR" format, of the line that contains the
--- caret.
--- @field caret_line_back_alpha (number)
--- The caret line's background alpha value, ranging from `0` (transparent) to
--- `255` (opaque).
--- The default value is `buffer.ALPHA_NOALPHA`, for no alpha.
--- @field caret_line_frame (number)
--- The caret line's frame width in pixels.
--- When non-zero, the line that contains the caret is framed instead of
--- colored in. The `buffer.caret_line_back` and `buffer.caret_line_back_alpha`
--- properties apply to the frame.
--- The default value is `0`.
--- @field caret_line_visible (bool)
--- Color the background of the line that contains the caret a different color.
--- The default value is `false`.
--- @field caret_line_visible_always (bool)
--- Always show the caret line, even when the window is not in focus.
--- The default value is `false`, showing the line only when the window is in
--- focus.
--- @field caret_period (number)
--- The time between caret blinks in milliseconds.
--- A value of `0` stops blinking.
--- The default value is `500`.
-- @field caret_sticky (number)
-- The caret's preferred horizontal position when moving between lines.
--
@@ -189,24 +115,6 @@
-- inserted indentation.
--
-- The default value is `buffer.CARETSTICKY_OFF`.
--- @field caret_style (number)
--- The caret's visual style.
---
--- * `buffer.CARETSTYLE_INVISIBLE`
--- No caret.
--- * `buffer.CARETSTYLE_LINE`
--- A line caret.
--- * `buffer.CARETSTYLE_BLOCK`
--- A block caret.
---
--- Any block setting may be combined with `buffer.CARETSTYLE_BLOCK_AFTER` via
--- bitwise OR (`|`) in order to draw the caret after the end of a selection,
--- as opposed to just inside it.
---
--- The default value is `buffer.CARETSTYLE_LINE`.
--- @field caret_width (number)
--- The line caret's pixel width in insert mode, either `0`, `1`, `2`, or `3`.
--- The default value is `1`.
-- @field char_at (table, Read-only)
-- Table of character bytes per position.
-- @field column (table, Read-only)
@@ -215,43 +123,8 @@
-- @field current_pos (number)
-- The caret's position.
-- When set, does not scroll the caret into view.
--- @field cursor (number)
--- The display cursor type.
---
--- * `buffer.CURSORNORMAL`
--- The text insert cursor.
--- * `buffer.CURSORARROW`
--- The arrow cursor.
--- * `buffer.CURSORWAIT`
--- The wait cursor.
--- * `buffer.CURSORREVERSEARROW`
--- The reversed arrow cursor.
---
--- The default value is `buffer.CURSORNORMAL`.
--- @field edge_colour (number)
--- The color, in "0xBBGGRR" format, of the single edge or background for long
--- lines according to `buffer.edge_mode`.
--- @field edge_column (number)
--- The column number to mark long lines at.
--- @field edge_mode (number)
--- The long line mark mode.
---
--- * `buffer.EDGE_NONE`
--- Long lines are not marked.
--- * `buffer.EDGE_LINE`
--- Draw a single vertical line whose color is [`buffer.edge_colour`]() at
--- column [`buffer.edge_column`]().
--- * `buffer.EDGE_BACKGROUND`
--- Change the background color of text after column [`buffer.edge_column`]()
--- to [`buffer.edge_colour`]().
--- * `buffer.EDGE_MULTILINE`
--- Draw vertical lines whose colors and columns are defined by calls to
--- [`buffer:multi_edge_add_line()`]().
-- @field encoding (string or nil)
-- The string encoding of the file, or `nil` for binary files.
--- @field end_at_last_line (bool)
--- Disable scrolling past the last line.
--- The default value is `true`.
-- @field end_styled (number, Read-only)
-- The current styling position or the last correctly styled character's
-- position.
@@ -269,51 +142,8 @@
--
-- The default value is `buffer.EOL_CRLF` on Windows platforms,
-- `buffer.EOL_LF` otherwise.
--- @field extra_ascent (number)
--- The amount of pixel padding above lines.
--- The default value is `0`.
--- @field extra_descent (number)
--- The amount of pixel padding below lines.
--- The default is `0`.
-- @field filename (string)
-- The absolute file path associated with the buffer.
--- @field first_visible_line (number)
--- The line number of the line at the top of the view.
--- @field fold_display_text_style (number)
--- The fold display text mode.
---
--- * `buffer.FOLDDISPLAYTEXT_HIDDEN`
--- Fold display text is not shown.
--- * `buffer.FOLDDISPLAYTEXT_STANDARD`
--- Fold display text is shown with no decoration.
--- * `buffer.FOLDDISPLAYTEXT_BOXED`
--- Fold display text is shown outlined with a box.
---
--- The default value is `buffer.FOLDDISPLAYTEXT_HIDDEN`.
--- @field fold_expanded (table)
--- Table of flags per line number that indicate whether or not fold points are
--- expanded for those line numbers.
--- Setting expanded fold states does not toggle folds; it only updates fold
--- margin markers. Use [`buffer.toggle_fold()`]() instead.
--- @field fold_flags (number, Read-only)
--- Bit-mask of folding lines to draw in the buffer.
---
--- * `buffer.FOLDFLAG_LINEBEFORE_EXPANDED`
--- Draw lines above expanded folds.
--- * `buffer.FOLDFLAG_LINEBEFORE_CONTRACTED`
--- Draw lines above collapsed folds.
--- * `buffer.FOLDFLAG_LINEAFTER_EXPANDED`
--- Draw lines below expanded folds.
--- * `buffer.FOLDFLAG_LINEAFTER_CONTRACTED`
--- Draw lines below collapsed folds.
--- * `buffer.FOLDFLAG_LEVELNUMBERS`
--- Show hexadecimal fold levels in line margins.
--- This option cannot be combined with `FOLDFLAG_LINESTATE`.
--- * `buffer.FOLDFLAG_LINESTATE`
--- Show line state in line margins.
--- This option cannot be combined with `FOLDFLAG_LEVELNUMBERS`.
---
--- The default value is `0`.
-- @field fold_level (table)
-- Table of fold level bit-masks per line number.
-- Fold level masks comprise of an integer level combined with any of the
@@ -328,140 +158,9 @@
-- @field fold_parent (table, Read-only)
-- Table of fold point line numbers per child line number.
-- A line number of `-1` means no line was found.
--- @field h_scroll_bar (bool)
--- Display the horizontal scroll bar.
--- The default value is `true`.
--- @field highlight_guide (number)
--- The indentation guide column number to also highlight when highlighting
--- matching braces, or `0` to stop indentation guide highlighting.
--- @field idle_styling (number)
--- The idle styling mode.
--- This mode has no effect when `buffer.wrap_mode` is on.
---
--- * `buffer.IDLESTYLING_NONE`
--- Style all the currently visible text before displaying it.
--- * `buffer.IDLESTYLING_TOVISIBLE`
--- Style some text before displaying it and then style the rest
--- incrementally in the background as an idle-time task.
--- * `buffer.IDLESTYLING_AFTERVISIBLE`
--- Style text after the currently visible portion in the background.
--- * `buffer.IDLESTYLING_ALL`
--- Style text both before and after the visible text in the background.
---
--- The default value is `buffer.IDLESTYLING_NONE`.
-- @field indent (number)
-- The number of spaces in one level of indentation.
-- The default value is `0`, which uses the value of [`buffer.tab_width`]().
--- @field indentation_guides (number)
--- The indentation guide drawing mode.
--- Indentation guides are dotted vertical lines that appear within indentation
--- whitespace at each level of indentation.
---
--- * `buffer.IV_NONE`
--- Does not draw any guides.
--- * `buffer.IV_REAL`
--- Draw guides only within indentation whitespace.
--- * `buffer.IV_LOOKFORWARD`
--- Draw guides beyond the current line up to the next non-empty line's
--- indentation level, but with an additional level if the previous non-empty
--- line is a fold point.
--- * `buffer.IV_LOOKBOTH`
--- Draw guides beyond the current line up to either the indentation level of
--- the previous or next non-empty line, whichever is greater.
---
--- The default value is `buffer.IV_NONE`.
--- @field indic_alpha (table)
--- Table of fill color alpha values, ranging from `0` (transparent) to `255`
--- (opaque), for indicator numbers from `1` to `32` whose styles are either
--- `INDIC_ROUNDBOX`, `INDIC_STRAIGHTBOX`, or `INDIC_DOTBOX`.
--- The default values are `buffer.ALPHA_NOALPHA`, for no alpha.
--- @field indic_fore (table)
--- Table of foreground colors, in "0xBBGGRR" format, for indicator numbers
--- from `1` to `32`.
--- Changing an indicator's foreground color resets that indicator's hover
--- foreground color.
--- @field indic_hover_fore (table)
--- Table of hover foreground colors, in "0xBBGGRR" format, for indicator
--- numbers from `1` to `32`.
--- The default values are the respective indicator foreground colors.
--- @field indic_hover_style (table)
--- Table of hover styles for indicators numbers from `1` to `32`. An
--- indicator's hover style drawn when either the cursor hovers over that
--- indicator or the caret is within that indicator.
--- The default values are the respective indicator styles.
--- @field indic_outline_alpha (table)
--- Table of outline color alpha values, ranging from `0` (transparent) to
--- `255` (opaque), for indicator numbers from `1` to `32` whose styles are
--- either `INDIC_ROUNDBOX`, `INDIC_STRAIGHTBOX`, or `INDIC_DOTBOX`.
--- The default values are `buffer.ALPHA_NOALPHA`, for no alpha.
--- @field indic_style (table)
--- Table of styles for indicator numbers from `1` to `32`.
---
--- * `buffer.INDIC_PLAIN`
--- An underline.
--- * `buffer.INDIC_SQUIGGLE`
--- A squiggly underline 3 pixels in height.
--- * `buffer.INDIC_TT`
--- An underline of small 'T' shapes.
--- * `buffer.INDIC_DIAGONAL`
--- An underline of diagonal hatches.
--- * `buffer.INDIC_STRIKE`
--- Strike out.
--- * `buffer.INDIC_HIDDEN`
--- Invisible.
--- * `buffer.INDIC_BOX`
--- A bounding box.
--- * `buffer.INDIC_ROUNDBOX`
--- A translucent box with rounded corners around the text. Use
--- [`buffer.indic_alpha`]() and [`buffer.indic_outline_alpha`]() to set the
--- fill and outline transparency, respectively. Their default values are
--- `30` and `50`.
--- * `buffer.INDIC_STRAIGHTBOX`
--- Similar to `INDIC_ROUNDBOX` but with sharp corners.
--- * `buffer.INDIC_DASH`
--- A dashed underline.
--- * `buffer.INDIC_DOTS`
--- A dotted underline.
--- * `buffer.INDIC_SQUIGGLELOW`
--- A squiggly underline 2 pixels in height.
--- * `buffer.INDIC_DOTBOX`
--- Similar to `INDIC_STRAIGHTBOX` but with a dotted outline.
--- Translucency alternates between [`buffer.indic_alpha`]() and
--- [`buffer.indic_outline_alpha`]() starting with the top-left pixel.
--- * `buffer.INDIC_SQUIGGLEPIXMAP`
--- Identical to `INDIC_SQUIGGLE` but draws faster by using a pixmap instead
--- of multiple line segments.
--- * `buffer.INDIC_COMPOSITIONTHICK`
--- A 2-pixel thick underline at the bottom of the line inset by 1 pixel on
--- on either side. Similar in appearance to the target in Asian language
--- input composition.
--- * `buffer.INDIC_COMPOSITIONTHIN`
--- A 1-pixel thick underline just before the bottom of the line inset by 1
--- pixel on either side. Similar in appearance to the non-target ranges in
--- Asian language input composition.
--- * `buffer.INDIC_FULLBOX`
--- Similar to `INDIC_STRAIGHTBOX` but extends to the top of its line,
--- potentially touching any similar indicators on the line above.
--- * `buffer.INDIC_TEXTFORE`
--- Changes the color of text to an indicator's foreground color.
--- * `buffer.INDIC_POINT`
--- A triangle below the start of the indicator range.
--- * `buffer.INDIC_POINTCHARACTER`
--- A triangle below the centre of the first character of the indicator
--- range.
--- * `buffer.INDIC_GRADIENT`
--- A box with a vertical gradient from solid on top to transparent on
--- bottom.
--- * `buffer.INDIC_GRADIENTCENTRE`
--- A box with a centered gradient from solid in the middle to transparent on
--- the top and bottom.
---
--- Use [`_SCINTILLA.next_indic_number()`]() for custom indicators.
--- Changing an indicator's style resets that indicator's hover style.
--- @field indic_under (table)
--- Table of flags that indicate whether or not to draw indicators behind text
--- instead of over the top of it for indicator numbers from `1` to `32`.
--- The default values are `false`.
-- @field indicator_current (number)
-- The indicator number in the range of `1` to `32` used by
-- [`buffer.indicator_fill_range()`]() and
@@ -478,118 +177,20 @@
-- Table of positions at the ends of indentation per line number.
-- @field line_indentation (table)
-- Table of column indentation amounts per line number.
--- @field line_visible (table, Read-only)
--- Table of flags per line number that indicate whether or not lines are
--- visible for those line numbers.
--- @field lines_on_screen (number, Read-only)
--- The number of completely visible lines in the view.
--- It is possible to have a partial line visible at the bottom of the view.
-- @field main_selection (number)
-- The number of the main, or most recent, selection.
-- Only an existing selection can be made main.
--- @field margins (number)
--- The number of margins.
--- The default value is `5`.
--- @field margin_back_n (table)
--- Table of background colors, in "0xBBGGRR" format, of margin numbers from
--- `1` to `buffer.margins` (`5` by default).
--- Only affects margins of type `buffer.MARGIN_COLOUR`.
--- @field margin_cursor_n (table)
--- Table of cursor types shown over margin numbers from `1` to
--- `buffer.margins` (`5` by default).
---
--- * `buffer.CURSORARROW`
--- Normal arrow cursor.
--- * `buffer.CURSORREVERSEARROW`
--- Reversed arrow cursor.
---
--- The default values are `buffer.CURSORREVERSEARROW`.
--- @field margin_left (number)
--- The pixel size of the left margin of the buffer text.
--- The default value is `1`.
--- @field margin_mask_n (table)
--- Table of bit-masks of markers whose symbols marker symbol margins can
--- display for margin numbers from `1` to `buffer.margins` (`5` by default).
--- Bit-masks are 32-bit values whose bits correspond to the 32 available
--- markers.
--- The default values are `0`, `buffer.MASK_FOLDERS`, `0`, `0`, and `0`, for
--- a line margin and logical marker margin.
--- @field margin_options (number)
--- A bit-mask of margin option settings.
---
--- * `buffer.MARGINOPTION_NONE`
--- None.
--- * `buffer.MARGINOPTION_SUBLINESELECT`
--- Select only a wrapped line's sub-line (rather than the entire line) when
--- the line number margin is clicked.
---
--- The default value is `buffer.MARGINOPTION_NONE`.
--- @field margin_right (number)
--- The pixel size of the right margin of the buffer text.
--- The default value is `1`.
--- @field margin_sensitive_n (table)
--- Table of flags that indicate whether or not mouse clicks in margins emit
--- `MARGIN_CLICK` events for margin numbers from `1` to `buffer.margins` (`5`
--- by default).
--- The default values are `false`.
+-- @field margin_text (table)
+-- Table of text displayed in text margins per line number.
-- @field margin_style (table)
-- Table of style numbers in the text margin per line number.
-- Only some style attributes are active in text margins: font, size, bold,
-- italics, fore, and back.
--- @field margin_text (table)
--- Table of text displayed in text margins per line number.
--- @field margin_type_n (table)
--- Table of margin types for margin numbers from `1` to `buffer.margins` (`5`
--- by default).
---
--- * `buffer.MARGIN_SYMBOL`
--- A marker symbol margin.
--- * `buffer.MARGIN_NUMBER`
--- A line number margin.
--- * `buffer.MARGIN_BACK`
--- A marker symbol margin whose background color matches the default text
--- background color.
--- * `buffer.MARGIN_FORE`
--- A marker symbol margin whose background color matches the default text
--- foreground color.
--- * `buffer.MARGIN_TEXT`
--- A text margin.
--- * `buffer.MARGIN_RTEXT`
--- A right-justified text margin.
--- * `buffer.MARGIN_COLOUR`
--- A marker symbol margin whose background color is configurable.
---
--- The default value for the first margin is `buffer.MARGIN_NUMBER`, followed
--- by `buffer.MARGIN_SYMBOL` for the rest.
--- @field margin_width_n (table)
--- Table of pixel margin widths for margin numbers from `1` to
--- `buffer.margins` (`5` by default).
--- @field marker_alpha (table, Write-only)
--- Table of alpha values, ranging from `0` (transparent) to `255` (opaque),
--- of markers drawn in the text area (not the margin) for markers numbers from
--- `1` to `32`.
--- The default values are `buffer.ALPHA_NOALPHA`, for no alpha.
--- @field marker_back (table, Write-only)
--- Table of background colors, in "0xBBGGRR" format, of marker numbers from
--- `1` to `32`.
--- @field marker_back_selected (table, Write-only)
--- Table of background colors, in "0xBBGGRR" format, of markers whose folding
--- blocks are selected for marker numbers from `1` to `32`.
--- @field marker_fore (table, Write-only)
--- Table of foreground colors, in "0xBBGGRR" format, of marker numbers from
--- `1` to `32`.
--- @field mouse_dwell_time (number)
--- The number of milliseconds the mouse must idle before generating a
--- `DWELL_START` event. A time of `buffer.TIME_FOREVER` will never generate
--- one.
--- @field mouse_selection_rectangular_switch (bool)
--- Whether or not pressing [`buffer.rectangular_selection_modifier`]() when
--- selecting text normally with the mouse turns on rectangular selection.
--- The default value is `false`.
-- @field modify (bool, Read-only)
-- Whether or not the buffer has unsaved changes.
--- @field move_extends_selection (bool)
+-- @field move_extends_selection (bool, Read-only)
-- Whether or not regular caret movement alters the selected text.
+-- [`buffer.selection_mode`]() dictates this property.
-- @field multi_paste (number)
-- The multiple selection paste mode.
--
@@ -629,49 +230,6 @@
-- The rectangular selection's caret position.
-- @field rectangular_selection_caret_virtual_space (number)
-- The amount of virtual space for the rectangular selection's caret.
--- @field rectangular_selection_modifier (number)
--- The modifier key used in combination with a mouse drag in order to create a
--- rectangular selection.
---
--- * `buffer.MOD_CTRL`
--- The "Control" modifier key.
--- * `buffer.MOD_ALT`
--- The "Alt" modifier key.
--- * `buffer.MOD_SUPER`
--- The "Super" modifier key, usually defined as the left "Windows" or
--- "Command" key.
---
--- The default value is `buffer.MOD_CTRL`.
--- @field representation (table)
--- The alternative string representations of characters.
--- Representations are displayed in the same way control characters are. Use
--- the empty string for the '\0' character when assigning its representation.
--- Call [`buffer.clear_representation()`]() to remove a representation.
--- @field rgba_image_height (number)
--- The height of the RGBA image to be defined using
--- [`buffer.marker_define_rgba_image()`]().
--- @field rgba_image_scale (number)
--- The scale factor in percent of the RGBA image to be defined using
--- [`buffer.marker_define_rgba_image()`]().
--- This is useful on OSX with a retina display where each display unit is 2
--- pixels: use a factor of `200` so that each image pixel is displayed using a
--- screen pixel. The default scale, `100`, will stretch each image pixel to
--- cover 4 screen pixels on a retina display.
--- @field rgba_image_width (number)
--- The width of the RGBA image to be defined using
--- [`buffer.marker_define_rgba_image()`]() and
--- [`buffer.register_rgba_image()`]().
--- @field scroll_width (number)
--- The horizontal scrolling pixel width.
--- For performance, the view does not measure the display width of the buffer
--- to determine the properties of the horizontal scroll bar, but uses an
--- assumed width instead. To ensure the width of the currently visible lines
--- can be scrolled use [`buffer.scroll_width_tracking`]().
--- The default value is `2000`.
--- @field scroll_width_tracking (bool)
--- Continuously update the horizontal scrolling width to match the maximum
--- width of a displayed line beyond [`buffer.scroll_width`]().
--- The default value is `false`.
-- @field search_flags (number)
-- The bit-mask of search flags used by [`buffer.search_in_target()`]().
--
@@ -686,13 +244,6 @@
-- Interpret search text as a regular expression.
--
-- The default value is `0`.
--- @field sel_alpha (number)
--- The selection's alpha value, ranging from `0` (transparent) to `255`
--- (opaque).
--- The default value is `buffer.ALPHA_NOALPHA`, for no alpha.
--- @field sel_eol_filled (bool)
--- Extend the selection to the view's right margin.
--- The default value is `false`.
-- @field selection_empty (bool, Read-only)
-- Whether or not no text is selected.
-- @field selection_end (number)
@@ -747,64 +298,6 @@
-- The number of active selections. There is always at least one selection.
-- @field style_at (table, Read-only)
-- Table of style numbers per position.
--- @field style_back (table)
--- Table of background colors, in "0xBBGGRR" format, of text for style numbers
--- from `1` to `256`.
--- @field style_bold (table)
--- Table of flags that indicate whether or not text is bold for style numbers
--- from `1` to `256`.
--- The default values are `false`.
--- @field style_case (table)
--- Table of letter case modes of text for style numbers from `1` to `256`.
---
--- * `buffer.CASE_MIXED`
--- Display text in normally.
--- * `buffer.CASE_UPPER`
--- Display text in upper case.
--- * `buffer.CASE_LOWER`
--- Display text in lower case.
--- * `buffer.CASE_CAMEL`
--- Display text in camel case.
---
--- The default values are `buffer.CASE_MIXED`.
--- @field style_changeable (table)
--- Table of flags that indicate whether or not text is changeable for style
--- numbers from `1` to `256`.
--- The default values are `true`.
--- Read-only styles do not allow the caret into the range of text.
--- @field style_eol_filled (table)
--- Table of flags that indicate whether or not the background colors of styles
--- whose characters occur last on lines extend all the way to the view's right
--- margin for style numbers from `1` to `256`.
--- The default values are `false`.
--- @field style_font (table)
--- Table of string font names of text for style numbers from `1` to `256`.
--- @field style_fore (table)
--- Table of foreground colors, in "0xBBGGRR" format, of text for style numbers
--- from `1` to `256`.
--- @field style_italic (table)
--- Table of flags that indicate whether or not text is italic for style
--- numbers from `1` to `256`.
--- The default values are `false`.
--- @field style_size (table)
--- Table of font sizes of text for style numbers from `1` to `256`.
--- @field style_underline (table)
--- Table of flags that indicate whether or not text is underlined for style
--- numbers from `1` to `256`.
--- The default values are `false`.
--- @field style_visible (table)
--- Table of flags that indicate whether or not text is visible for style
--- numbers from `1` to `256`.
--- The default values are `true`.
--- @field tab_draw_mode (number)
--- The draw mode of visible tabs.
---
--- * `buffer.TD_LONGARROW`
--- An arrow that stretches until the tabstop.
--- * `buffer.TD_STRIKEOUT`
--- A horizontal line that stretches until the tabstop.
---
--- The default value is `buffer.TD_LONGARROW`.
-- @field tab_indents (bool)
-- Indent text when tabbing within indentation.
-- The default value is `false`.
@@ -840,25 +333,6 @@
-- does not convert any of the buffer's existing indentation. Use
-- [`textadept.editing.convert_indentation()`]() to do so.
-- The default value is `true`.
--- @field v_scroll_bar (bool)
--- Display the vertical scroll bar.
--- The default value is `true`.
--- @field view_eol (bool)
--- Display end of line characters.
--- The default value is `false`.
--- @field view_ws (number)
--- The whitespace visibility mode.
---
--- * `buffer.WS_INVISIBLE`
--- Whitespace is invisible.
--- * `buffer.WS_VISIBLEALWAYS`
--- Display all space characters as dots and tab characters as arrows.
--- * `buffer.WS_VISIBLEAFTERINDENT`
--- Display only non-indentation spaces and tabs as dots and arrows.
--- * `buffer.WS_VISIBLEONLYININDENT`
--- Display only indentation spaces and tabs as dots and arrows.
---
--- The default value is `buffer.WS_INVISIBLE`.
-- @field virtual_space_options (number)
-- The virtual space mode.
--
@@ -882,144 +356,10 @@
-- Set this only after setting [`buffer.word_chars`]().
-- The default value is a string that contains all non-newline characters less
-- than ASCII value 33.
--- @field whitespace_size (number)
--- The pixel size of the dots that represent space characters when whitespace
--- is visible.
--- The default value is `1`.
-- @field word_chars (string)
-- The string set of characters recognized as word characters.
-- The default value is a string that contains alphanumeric characters, an
-- underscore, and all characters greater than ASCII value 127.
--- @field wrap_indent_mode (number)
--- The wrapped line indent mode.
---
--- * `buffer.WRAPINDENT_FIXED`
--- Indent wrapped lines by [`buffer.wrap_start_indent`]().
--- * `buffer.WRAPINDENT_SAME`
--- Indent wrapped lines the same amount as the first line.
--- * `buffer.WRAPINDENT_INDENT`
--- Indent wrapped lines one more level than the level of the first line.
--- * `buffer.WRAPINDENT_DEEPINDENT`
--- Indent wrapped lines two more levels than the level of the first line.
---
--- The default value is `buffer.WRAPINDENT_FIXED`.
--- @field wrap_mode (number)
--- Long line wrap mode.
---
--- * `buffer.WRAP_NONE`
--- Long lines are not wrapped.
--- * `buffer.WRAP_WORD`
--- Wrap long lines at word (and style) boundaries.
--- * `buffer.WRAP_CHAR`
--- Wrap long lines at character boundaries.
--- * `buffer.WRAP_WHITESPACE`
--- Wrap long lines at word boundaries (ignoring style boundaries).
---
--- The default value is `buffer.WRAP_NONE`.
--- @field wrap_start_indent (number)
--- The number of spaces of indentation to display wrapped lines with if
--- [`buffer.wrap_indent_mode`]() is `buffer.WRAP_INDENT_FIXED`.
--- The default value is `0`.
--- @field wrap_visual_flags (number)
--- The wrapped line visual flag display mode.
---
--- * `buffer.WRAPVISUALFLAG_NONE`
--- No visual flags.
--- * `buffer.WRAPVISUALFLAG_END`
--- Show a visual flag at the end of a wrapped line.
--- * `buffer.WRAPVISUALFLAG_START`
--- Show a visual flag at the beginning of a sub-line.
--- * `buffer.WRAPVISUALFLAG_MARGIN`
--- Show a visual flag in the sub-line's line number margin.
---
--- The default value is `buffer.WRAPVISUALFLAG_NONE`.
--- @field wrap_visual_flags_location (number)
--- The wrapped line visual flag drawing mode.
---
--- * `buffer.WRAPVISUALFLAGLOC_DEFAULT`
--- Draw a visual flag near the view's right margin.
--- * `buffer.WRAPVISUALFLAGLOC_END_BY_TEXT`
--- Draw a visual flag near text at the end of a wrapped line.
--- * `buffer.WRAPVISUALFLAGLOC_START_BY_TEXT`
--- Draw a visual flag near text at the beginning of a subline.
---
--- The default value is `buffer.WRAPVISUALFLAGLOC_DEFAULT`.
--- @field x_offset (number)
--- The horizontal scroll pixel position.
--- A value of `0` is the normal position with the first text column visible at
--- the left of the view.
--- @field zoom (number)
--- The number of points to add to the size of all fonts.
--- Negative values are allowed.
--- The default value is `0`.
--- @field ANNOTATION_BOXED (number, Read-only)
---
--- @field ANNOTATION_HIDDEN (number, Read-only)
---
--- @field ANNOTATION_STANDARD (number, Read-only)
---
--- @field ANNOTATION_INDENTED (number, Read-only)
---
--- @field CARETSTYLE_BLOCK (number, Read-only)
---
--- @field CARETSTYLE_INVISIBLE (number, Read-only)
---
--- @field CARETSTYLE_LINE (number, Read-only)
---
--- @field CARET_EVEN (number, Read-only)
---
--- @field CARET_JUMPS (number, Read-only)
---
--- @field CARET_SLOP (number, Read-only)
---
--- @field CARET_STRICT (number, Read-only)
---
--- @field EDGE_BACKGROUND (number, Read-only)
---
--- @field EDGE_LINE (number, Read-only)
---
--- @field EDGE_MULTILINE (number, Read-only)
---
--- @field EDGE_NONE (number, Read-only)
---
--- @field INDIC_BOX (number, Read-only)
---
--- @field INDIC_COMPOSITIONTHICK (number, Read-only)
---
--- @field INDIC_COMPOSITIONTHIN (number, Read-only)
---
--- @field INDIC_DASH (number, Read-only)
---
--- @field INDIC_DIAGONAL (number, Read-only)
---
--- @field INDIC_DOTBOX (number, Read-only)
---
--- @field INDIC_DOTS (number, Read-only)
---
--- @field INDIC_FULLBOX (number, Read-only)
---
--- @field INDIC_HIDDEN (number, Read-only)
---
--- @field INDICATOR_MAX (number, Read-only)
---
--- @field INDIC_PLAIN (number, Read-only)
---
--- @field INDIC_ROUNDBOX (number, Read-only)
---
--- @field INDIC_SQUIGGLE (number, Read-only)
---
--- @field INDIC_SQUIGGLELOW (number, Read-only)
---
--- @field INDIC_SQUIGGLEPIXMAP (number, Read-only)
---
--- @field INDIC_STRAIGHTBOX (number, Read-only)
---
--- @field INDIC_STRIKE (number, Read-only)
---
--- @field INDIC_TEXTFORE (number, Read-only)
---
--- @field INDIC_TT (number, Read-only)
---
-- @field FIND_MATCHCASE (number, Read-only)
--
-- @field FIND_REGEXP (number, Read-only)
@@ -1028,46 +368,12 @@
--
-- @field FIND_WORDSTART (number, Read-only)
--
--- @field MOD_ALT (number, Read-only)
---
--- @field MOD_CTRL (number, Read-only)
---
--- @field MOD_META (number, Read-only)
---
--- @field MOD_SHIFT (number, Read-only)
---
--- @field MOD_SUPER (number, Read-only)
---
--- @field MOUSE_DRAG (number, Read-only)
---
--- @field MOUSE_PRESS (number, Read-only)
---
--- @field MOUSE_RELEASE (number, Read-only)
---
-- @field VS_NONE (number, Read-only)
--
-- @field VS_RECTANGULARSELECTION (number, Read-only)
--
-- @field VS_USERACCESSIBLE (number, Read-only)
--
--- @field WS_INVISIBLE (number, Read-only)
---
--- @field WS_VISIBLEAFTERINDENT (number, Read-only)
---
--- @field WS_VISIBLEALWAYS (number, Read-only)
---
--- @field ALPHA_NOALPHA (number, Read-only)
---
--- @field ALPHA_OPAQUE (number, Read-only)
---
--- @field ALPHA_TRANSPARENT (number, Read-only)
---
--- @field AUTOMATICFOLD_CHANGE (number, Read-only)
---
--- @field AUTOMATICFOLD_CLICK (number, Read-only)
---
--- @field AUTOMATICFOLD_SHOW (number, Read-only)
---
-- @field CARETSTICKY_OFF (number, Read-only)
--
-- @field CARETSTICKY_ON (number, Read-only)
@@ -1078,44 +384,12 @@
--
-- @field CASEINSENSITIVEBEHAVIOUR_RESPECTCASE (number, Read-only)
--
--- @field CASE_LOWER (number, Read-only)
---
--- @field CASE_MIXED (number, Read-only)
---
--- @field CASE_UPPER (number, Read-only)
---
--- @field CURSORARROW (number, Read-only)
---
--- @field CURSORNORMAL (number, Read-only)
---
--- @field CURSORREVERSEARROW (number, Read-only)
---
--- @field CURSORWAIT (number, Read-only)
---
-- @field EOL_CR (number, Read-only)
--
-- @field EOL_CRLF (number, Read-only)
--
-- @field EOL_LF (number, Read-only)
--
--- @field FOLDACTION_CONTRACT (number, Read-only)
---
--- @field FOLDACTION_EXPAND (number, Read-only)
---
--- @field FOLDACTION_TOGGLE (number, Read-only)
---
--- @field FOLDFLAG_LEVELNUMBERS (number, Read-only)
---
--- @field FOLDFLAG_LINEAFTER_CONTRACTED (number, Read-only)
---
--- @field FOLDFLAG_LINEAFTER_EXPANDED (number, Read-only)
---
--- @field FOLDFLAG_LINEBEFORE_CONTRACTED (number, Read-only)
---
--- @field FOLDFLAG_LINEBEFORE_EXPANDED (number, Read-only)
---
--- @field FOLDFLAG_LINESTATE (number, Read-only)
---
-- @field FOLDLEVELBASE (number, Read-only)
--
-- @field FOLDLEVELHEADERFLAG (number, Read-only)
@@ -1124,31 +398,9 @@
--
-- @field FOLDLEVELWHITEFLAG (number, Read-only)
--
--- @field IV_LOOKBOTH (number, Read-only)
---
--- @field IV_LOOKFORWARD (number, Read-only)
---
--- @field IV_NONE (number, Read-only)
---
--- @field IV_REAL (number, Read-only)
---
--- @field MARGINOPTION_NONE (number, Read-only)
---
--- @field MARGINOPTION_SUBLINESELECT (number, Read-only)
---
--- @field MARGIN_BACK (number, Read-only)
---
--- @field MARGIN_COLOUR (number, Read-only)
---
--- @field MARGIN_FORE (number, Read-only)
---
--- @field MARGIN_NUMBER (number, Read-only)
---
--- @field MARGIN_RTEXT (number, Read-only)
---
--- @field MARGIN_SYMBOL (number, Read-only)
+-- @field INDICATOR_MAX (number, Read-only)
--
--- @field MARGIN_TEXT (number, Read-only)
+-- @field MARK_AVAILABLE (number, Read-only)
--
-- @field MARKER_MAX (number, Read-only)
--
@@ -1166,76 +418,6 @@
--
-- @field MARKNUM_FOLDERTAIL (number, Read-only)
--
--- @field MARK_ARROW (number, Read-only)
---
--- @field MARK_ARROWDOWN (number, Read-only)
---
--- @field MARK_ARROWS (number, Read-only)
---
--- @field MARK_AVAILABLE (number, Read-only)
---
--- @field MARK_BACKGROUND (number, Read-only)
---
--- @field MARK_BOOKMARK (number, Read-only)
---
--- @field MARK_BOXMINUS (number, Read-only)
---
--- @field MARK_BOXMINUSCONNECTED (number, Read-only)
---
--- @field MARK_BOXPLUS (number, Read-only)
---
--- @field MARK_BOXPLUSCONNECTED (number, Read-only)
---
--- @field MARK_CHARACTER (number, Read-only)
---
--- @field MARK_CIRCLE (number, Read-only)
---
--- @field MARK_CIRCLEMINUS (number, Read-only)
---
--- @field MARK_CIRCLEMINUSCONNECTED (number, Read-only)
---
--- @field MARK_CIRCLEPLUS (number, Read-only)
---
--- @field MARK_CIRCLEPLUSCONNECTED (number, Read-only)
---
--- @field MARK_DOTDOTDOT (number, Read-only)
---
--- @field MARK_EMPTY (number, Read-only)
---
--- @field MARK_FULLRECT (number, Read-only)
---
--- @field MARK_LCORNER (number, Read-only)
---
--- @field MARK_LCORNERCURVE (number, Read-only)
---
--- @field MARK_LEFTRECT (number, Read-only)
---
--- @field MARK_MINUS (number, Read-only)
---
--- @field MARK_PIXMAP (number, Read-only)
---
--- @field MARK_PLUS (number, Read-only)
---
--- @field MARK_RGBAIMAGE (number, Read-only)
---
--- @field MARK_ROUNDRECT (number, Read-only)
---
--- @field MARK_SHORTARROW (number, Read-only)
---
--- @field MARK_SMALLRECT (number, Read-only)
---
--- @field MARK_TCORNER (number, Read-only)
---
--- @field MARK_TCORNERCURVE (number, Read-only)
---
--- @field MARK_UNDERLINE (number, Read-only)
---
--- @field MARK_VERTICALBOOKMARK (number, Read-only)
---
--- @field MARK_VLINE (number, Read-only)
---
--- @field MASK_FOLDERS (number, Read-only)
---
-- @field MULTIAUTOC_EACH (number, Read-only)
--
-- @field MULTIAUTOC_ONCE (number, Read-only)
@@ -1258,66 +440,12 @@
--
-- @field SEL_THIN (number, Read-only)
--
--- @field TIME_FOREVER (number, Read-only)
+-- @field STYLE_MAX (number, Read-only)
--
-- @field UPDATE_CONTENT (number, Read-only)
--
--- @field UPDATE_H_SCROLL (number, Read-only)
---
-- @field UPDATE_SELECTION (number, Read-only)
--
--- @field UPDATE_V_SCROLL (number, Read-only)
---
--- @field WRAPINDENT_FIXED (number, Read-only)
---
--- @field WRAPINDENT_INDENT (number, Read-only)
---
--- @field WRAPINDENT_SAME (number, Read-only)
---
--- @field WRAPVISUALFLAGLOC_DEFAULT (number, Read-only)
---
--- @field WRAPVISUALFLAGLOC_END_BY_TEXT (number, Read-only)
---
--- @field WRAPVISUALFLAGLOC_START_BY_TEXT (number, Read-only)
---
--- @field WRAPVISUALFLAG_END (number, Read-only)
---
--- @field WRAPVISUALFLAG_MARGIN (number, Read-only)
---
--- @field WRAPVISUALFLAG_NONE (number, Read-only)
---
--- @field WRAPVISUALFLAG_START (number, Read-only)
---
--- @field WRAP_CHAR (number, Read-only)
---
--- @field WRAP_NONE (number, Read-only)
---
--- @field WRAP_WHITESPACE (number, Read-only)
---
--- @field WRAP_WORD (number, Read-only)
---
--- @field STYLE_BRACEBAD (number, Read-only)
---
--- @field STYLE_BRACELIGHT (number, Read-only)
---
--- @field STYLE_CALLTIP (number, Read-only)
---
--- @field STYLE_CONTROLCHAR (number, Read-only)
---
--- @field STYLE_DEFAULT (number, Read-only)
---
--- @field STYLE_FOLDDISPLAYTEXT (number, Read-only)
---
--- @field STYLE_INDENTGUIDE (number, Read-only)
---
--- @field STYLE_LINENUMBER (number, Read-only)
---
--- @field STYLE_MAX (number, Read-only)
---
--- @field VISIBLE_SLOP (number, Read-only)
---
--- @field VISIBLE_STRICT (number, Read-only)
---
module('buffer')
---
@@ -1418,43 +546,6 @@ function back_tab(buffer) end
function begin_undo_action(buffer) end
---
--- Highlights the character at position *pos* as an unmatched brace character
--- using the `'style.bracebad'` style.
--- Removes highlighting when *pos* is `-1`.
--- @param buffer A buffer.
--- @param pos The position in *buffer* to highlight, or `-1` to remove the
--- highlight.
-function brace_bad_light(buffer, pos) end
-
----
--- Highlights unmatched brace characters with indicator number *indicator*, in
--- the range of `1 to `32`, instead of the
--- `buffer.STYLE_BRACEBAD` style if *use_indicator* is `true`.
--- @param buffer A buffer.
--- @param use_indicator Whether or not to use an indicator.
--- @param indicator The indicator number to use.
-function brace_bad_light_indicator(buffer, use_indicator, indicator) end
-
----
--- Highlights the characters at positions *pos1* and *pos2* as matching braces
--- using the `'style.bracelight'` style.
--- If indent guides are enabled, locates the column with `buffer.column` and
--- sets `buffer.highlight_guide` in order to highlight the indent guide.
--- @param buffer A buffer.
--- @param pos1 The first position in *buffer* to highlight.
--- @param pos2 The second position in *buffer* to highlight.
-function brace_highlight(buffer, pos1, pos2) end
-
----
--- Highlights matching brace characters with indicator number *indicator*, in
--- the range of `1` to `32`, instead of the
--- `buffer.STYLE_BRACELIGHT` style if *use_indicator* is `true`.
--- @param buffer A buffer.
--- @param use_indicator Whether or not to use an indicator.
--- @param indicator The indicator number to use.
-function brace_highlight_indicator(buffer, use_indicator, indicator) end
-
----
-- Returns the position of the matching brace for the brace character at
-- position *pos*, taking nested braces into account, or `-1`.
-- The brace characters recognized are '(', ')', '[', ']', '{', '}', '<', and
@@ -1483,14 +574,6 @@ function call_tip_cancel(buffer) end
function call_tip_pos_start(buffer) end
---
--- Highlights a call tip's text between positions *start_pos* to *end_pos* with
--- the color `buffer.call_tip_fore_hlt`.
--- @param buffer A buffer.
--- @param start_pos The start position in a call tip text to highlight.
--- @param end_pos The end position in a call tip text to highlight.
-function call_tip_set_hlt(buffer, start_pos, end_pos) end
-
----
-- Displays a call tip at position *pos* with string *text* as the call tip's
-- contents.
-- Any "\001" or "\002" bytes in *text* are replaced by clickable up or down
@@ -1576,19 +659,6 @@ function clear_all(buffer) end
function clear_document_style(buffer) end
---
--- Clears all images registered using `buffer.register_image()` and
--- `buffer.register_rgba_image()`.
--- @param buffer A buffer.
-function clear_registered_images(buffer) end
-
----
--- Removes the alternate string representation for character *char*.
--- @param buffer A buffer.
--- @param char The character in `buffer.representations` to remove the alternate
--- string representation for.
-function clear_representation(buffer, char) end
-
----
-- Removes all selections and moves the caret to the beginning of the buffer.
-- @param buffer A buffer.
function clear_selections(buffer) end
@@ -1605,14 +675,6 @@ function clear_selections(buffer) end
function colourise(buffer, start_pos, end_pos) end
---
--- Returns the line number of the next contracted fold point starting from line
--- number *line*, or `-1` if none exists.
--- @param buffer A buffer.
--- @param line The line number in *buffer* to start at.
--- @return number
-function contracted_fold_next(buffer, line) end
-
----
-- Converts all end of line characters to those in end of line mode *mode*.
-- @param buffer A buffer.
-- @param mode The end of line mode to convert to. Valid values are:
@@ -1720,17 +782,6 @@ function delete_back_not_line(buffer) end
function delete_range(buffer, pos, length) end
---
--- Returns the actual line number of displayed line number *display_line*,
--- taking hidden lines into account.
--- If *display_line* is less than or equal to `1`, returns `1`. If
--- *display_line* is greater than the number of displayed lines, returns
--- `buffer.line_count`.
--- @param buffer A buffer.
--- @param display_line The display line number to use.
--- @return number
-function doc_line_from_visible(buffer, display_line) end
-
----
-- Moves the caret to the end of the buffer.
-- @param buffer A buffer.
function document_end(buffer) end
@@ -1774,20 +825,6 @@ function empty_undo_buffer(buffer) end
function end_undo_action(buffer) end
---
--- Ensures line number *line* is visible by expanding any fold points hiding it.
--- @param buffer A buffer.
--- @param line The line number in *buffer* to ensure visible.
-function ensure_visible(buffer, line) end
-
----
--- Ensures line number *line* is visible by expanding any fold points hiding it
--- based on the vertical caret policy previously defined in
--- `buffer.set_visible_policy()`.
--- @param buffer A buffer.
--- @param line The line number in *buffer* to ensure visible.
-function ensure_visible_enforce_policy(buffer, line) end
-
----
-- Returns the position of column number *column* on line number *line* (taking
-- tab and multi-byte characters into account), or the position at the end of
-- line *line*.
@@ -1797,50 +834,12 @@ function ensure_visible_enforce_policy(buffer, line) end
function find_column(buffer, line, column) end
---
--- Contracts, expands, or toggles all fold points, depending on *action*.
--- When toggling, the state of the first fold point determines whether to
--- expand or contract.
--- @param buffer A buffer.
--- @param action The fold action to perform. Valid values are:
--- * `buffer.FOLDACTION_CONTRACT`
--- * `buffer.FOLDACTION_EXPAND`
--- * `buffer.FOLDACTION_TOGGLE`
-function fold_all(buffer, action) end
-
----
--- Contracts, expands, or toggles the fold point on line number *line*, as well
--- as all of its children, depending on *action*.
--- @param buffer A buffer.
--- @param line The line number in *buffer* to set the fold states for.
--- @param action The fold action to perform. Valid values are:
--- * `buffer.FOLDACTION_CONTRACT`
--- * `buffer.FOLDACTION_EXPAND`
--- * `buffer.FOLDACTION_TOGGLE`
-function fold_children(buffer, line, action) end
-
----
--- Contracts, expands, or toggles the fold point on line number *line*,
--- depending on *action*.
--- @param buffer A buffer.
--- @param line The line number in *buffer* to set the fold state for.
--- @param action The fold action to perform. Valid values are:
--- * `buffer.FOLDACTION_CONTRACT`
--- * `buffer.FOLDACTION_EXPAND`
--- * `buffer.FOLDACTION_TOGGLE`
-function fold_line(buffer, line, action) end
-
----
-- Returns the current line's text and the caret's position on that line.
-- @param buffer A buffer.
-- @return string, number
function get_cur_line(buffer) end
---
--- Returns the default fold display text.
--- @param buffer A buffer.
-function get_default_fold_display_text(buffer) end
-
----
-- Returns the line number of the last line after line number *line* whose fold
-- level is greater than *level*.
-- If *level* is `-1`, returns the level of *line*.
@@ -1898,15 +897,6 @@ function goto_line(buffer, line) end
function goto_pos(buffer, pos) end
---
--- Hides the range of lines between line numbers *start_line* to *end_line*.
--- This has no effect on fold levels or fold flags and the first line cannot be
--- hidden.
--- @param buffer A buffer.
--- @param start_line The start line of the range of lines in *buffer* to hide.
--- @param end_line The end line of the range of lines in *buffer* to hide.
-function hide_lines(buffer, start_line, end_line) end
-
----
-- Moves the caret to the beginning of the current line.
-- @param buffer A buffer.
function home(buffer) end
@@ -2115,24 +1105,6 @@ function line_length(buffer, line) end
function line_reverse(buffer) end
---
--- Scrolls the buffer right *columns* columns and down *lines* lines.
--- Negative values are allowed.
--- @param buffer A buffer.
--- @param columns The number of columns to scroll horizontally.
--- @param lines The number of lines to scroll vertically.
-function line_scroll(buffer, columns, lines) end
-
----
--- Scrolls the buffer down one line, keeping the caret visible.
--- @param buffer A buffer.
-function line_scroll_down(buffer) end
-
----
--- Scrolls the buffer up one line, keeping the caret visible.
--- @param buffer A buffer.
-function line_scroll_up(buffer) end
-
----
-- Swaps the current line with the previous one.
-- @param buffer A buffer.
function line_transpose(buffer) end
@@ -2201,51 +1173,6 @@ function marker_add(buffer, line, marker) end
function marker_add_set(buffer, line, marker_mask) end
---
--- Assigns marker symbol *symbol* to marker number *marker*, in the range of `1`
--- to `32`.
--- *symbol* is shown in marker symbol margins next to lines marked with
--- *marker*.
--- @param buffer A buffer.
--- @param marker The marker number in the range of `1` to `32` to set *symbol*
--- for.
--- @param symbol The marker symbol: `buffer.MARK_*`.
--- @see _SCINTILLA.next_marker_number
-function marker_define(buffer, marker, symbol) end
-
----
--- Associates marker number *marker*, in the range of `1` to `32`, with XPM
--- image *pixmap*.
--- The `buffer.MARK_PIXMAP` marker symbol must be assigned to *marker*.
--- *pixmap* is shown in marker symbol margins next to lines marked with
--- *marker*.
--- @param buffer A buffer.
--- @param marker The marker number in the range of `1` to `32` to define
--- pixmap *pixmap* for.
--- @param pixmap The string pixmap data.
-function marker_define_pixmap(buffer, marker, pixmap) end
-
----
--- Associates marker number *marker*, in the range of `1` to `32`, with RGBA
--- image *pixels*.
--- The dimensions for *pixels* (`buffer.rgba_image_width` and
--- `buffer.rgba_image_height`) must have already been defined. *pixels* is a
--- sequence of 4 byte pixel values (red, blue, green, and alpha) defining the
--- image line by line starting at the top-left pixel.
--- The `buffer.MARK_RGBAIMAGE` marker symbol must be assigned to *marker*.
--- *pixels* is shown in symbol margins next to lines marked with *marker*.
--- @param buffer A buffer.
--- @param marker The marker number in the range of `1` to `32` to define RGBA
--- data *pixels* for.
--- @param pixels The string sequence of 4 byte pixel values starting with the
--- pixels for the top line, with the leftmost pixel first, then continuing
--- with the pixels for subsequent lines. There is no gap between lines for
--- alignment reasons. Each pixel consists of, in order, a red byte, a green
--- byte, a blue byte and an alpha byte. The colour bytes are not premultiplied
--- by the alpha value. That is, a fully red pixel that is 25% opaque will be
--- `[FF, 00, 00, 3F]`.
-function marker_define_rgba_image(buffer, marker, pixels) end
-
----
-- Deletes marker number *marker*, in the range of `1` to `32`, from line number
-- *line*. If *marker* is `-1`, deletes all markers from *line*.
-- @param buffer A buffer.
@@ -2270,13 +1197,6 @@ function marker_delete_all(buffer, marker) end
function marker_delete_handle(buffer, handle) end
---
--- Highlights the margin fold markers for the current fold block if *enabled* is
--- `true`.
--- @param buffer A buffer.
--- @param enabled Whether or not to enable highlight.
-function marker_enable_highlight(buffer, enabled) end
-
----
-- Returns a bit-mask that represents the markers that were added to line number
-- *line*.
-- The first bit is set if marker number 1 is present, the second bit for marker
@@ -2337,16 +1257,6 @@ function marker_number_from_line(buffer, line, n) end
function marker_previous(buffer, line, marker_mask) end
---
--- Returns the symbol assigned to marker number *marker*, in the range of `1` to
--- `32`, used in `buffer.marker_define()`,
--- `buffer.marker_define_pixmap()`, or `buffer.marker_define_rgba_image()`.
--- @param buffer A buffer.
--- @param marker The marker number in the range of `1` to `32` to get the symbol
--- of.
--- @return number
-function marker_symbol_defined(buffer, marker) end
-
----
-- Moves the caret into view if it is not already, removing any selections.
-- @param buffer A buffer.
function move_caret_inside_view(buffer) end
@@ -2377,19 +1287,6 @@ function multiple_select_add_each(buffer) end
function multiple_select_add_next(buffer) end
---
--- Adds a new vertical line at column number *column* with color *color*, in
--- "0xBBGGRR" format.
--- @param buffer A buffer.
--- @param column The column number to add a vertical line at.
--- @param color The color in "0xBBGGRR" format.
-function multi_edge_add_line(buffer, column, color) end
-
----
--- Clears all vertical lines created by `buffer:multi_edge_add_line()`.
--- @param buffer A buffer.
-function multi_edge_clear_all(buffer) end
-
----
-- Returns the name of style number *style*, which is between `1` and `256`.
-- @param buffer A buffer.
-- @param style The style number between `1` and `256` to get the name of.
@@ -2510,27 +1407,6 @@ function position_relative(buffer, pos, n) end
function redo(buffer) end
---
--- Registers XPM image *xpm_data* to type number *type* for use in
--- autocompletion and user lists.
--- @param buffer A buffer.
--- @param type Integer type to register the image with.
--- @param xpm_data The XPM data as described in `buffer.marker_define_pixmap()`.
-function register_image(buffer, type, xpm_data) end
-
----
--- Registers RGBA image *pixels* to type number *type* for use in autocompletion
--- and user lists.
--- The dimensions for *pixels* (`buffer.rgba_image_width` and
--- `buffer.rgba_image_height`) must have already been defined. *pixels* is a
--- sequence of 4 byte pixel values (red, blue, green, and alpha) defining the
--- image line by line starting at the top-left pixel.
--- @param buffer A buffer.
--- @param type Integer type to register the image with.
--- @param pixels The RGBA data as described in
--- `buffer.marker_define_rgba_image()`.
-function register_rgba_image(buffer, type, pixels) end
-
----
-- Replaces the selected text with string *text*, scrolling the caret into view.
-- @param buffer A buffer.
-- @param text The text to replace the selected text with.
@@ -2562,35 +1438,6 @@ function replace_target_re(buffer, text) end
function rotate_selection(buffer) end
---
--- Scrolls the caret into view based on the policies previously defined in
--- `buffer.set_x_caret_policy()` and `buffer.set_y_caret_policy()`.
--- @param buffer A buffer.
--- @see set_x_caret_policy
--- @see set_y_caret_policy
-function scroll_caret(buffer) end
-
----
--- Scrolls into view the range of text between positions *primary_pos* and
--- *secondary_pos*, with priority given to *primary_pos*.
--- Similar to `buffer.scroll_caret()`, but with *primary_pos* instead of
--- `buffer.current_pos`.
--- This is useful for scrolling search results into view.
--- @param buffer A buffer.
--- @param secondary_pos The secondary range position to scroll into view.
--- @param primary_pos The primary range position to scroll into view.
-function scroll_range(buffer, secondary_pos, primary_pos) end
-
----
--- Scrolls to the end of the buffer without moving the caret.
--- @param buffer A buffer.
-function scroll_to_end(buffer) end
-
----
--- Scrolls to the beginning of the buffer without moving the caret.
--- @param buffer A buffer.
-function scroll_to_start(buffer) end
-
----
-- Anchors the position that `buffer.search_next()` and `buffer.search_prev()`
-- start at to the beginning of the current selection or caret position.
-- @param buffer A buffer.
@@ -2651,13 +1498,6 @@ function selection_duplicate(buffer) end
function set_chars_default(buffer) end
---
--- Sets the default fold display text to string *text*.
--- @param buffer A buffer.
--- @param text The text to display by default next to folded lines.
--- @see toggle_fold_show_text
-function set_default_fold_display_text(buffer, text) end
-
----
-- Moves the caret to position *pos* without scrolling the view and removes any
-- selections.
-- @param buffer A buffer
@@ -2665,23 +1505,6 @@ function set_default_fold_display_text(buffer, text) end
function set_empty_selection(buffer, pos) end
---
--- Overrides the fold margin's default color with color *color*, in "0xBBGGRR"
--- format,
--- if *use_setting* is `true`.
--- @param buffer A buffer.
--- @param use_setting Whether or not to use *color*.
--- @param color The color in "0xBBGGRR" format.
-function set_fold_margin_colour(buffer, use_setting, color) end
-
----
--- Overrides the fold margin's default highlight color with color *color*, in
--- "0xBBGGRR" format, if *use_setting* is `true`.
--- @param buffer A buffer.
--- @param use_setting Whether or not to use *color*.
--- @param color The color in "0xBBGGRR" format.
-function set_fold_margin_hi_colour(buffer, use_setting, color) end
-
----
-- Indicates the buffer has no unsaved changes.
-- @param buffer A buffer.
function set_save_point(buffer) end
@@ -2698,24 +1521,6 @@ function set_save_point(buffer) end
function set_sel(buffer, start_pos, end_pos) end
---
--- Overrides the selection's default background color with color *color*, in
--- "0xBBGGRR" format, if *use_setting* is `true`.
--- Overwrites any existing `buffer.additional_sel_back` color.
--- @param buffer A buffer.
--- @param use_setting Whether or not to use *color*.
--- @param color The color in "0xBBGGRR" format.
-function set_sel_back(buffer, use_setting, color) end
-
----
--- Overrides the selection's default foreground color with color *color*, in
--- "0xBBGGRR" format, if *use_setting* is `true`.
--- Overwrites any existing `buffer.additional_sel_fore` color.
--- @param buffer A buffer.
--- @param use_setting Whether or not to use *color*.
--- @param color The color in "0xBBGGRR" format.
-function set_sel_fore(buffer, use_setting, color) end
-
----
-- Selects the range of text between positions *start_pos* to *end_pos*,
-- removing all other selections.
-- @param buffer A buffer.
@@ -2749,59 +1554,6 @@ function set_target_range(buffer, start_pos, end_pos) end
function set_text(buffer, text) end
---
--- Defines scrolling policy bit-mask *policy* as the policy for keeping the
--- caret *y* number of lines away from the vertical margins as
--- `buffer.ensure_visible_enforce_policy()` redisplays hidden or folded lines.
--- It is similar in operation to `buffer.set_y_caret_policy()`.
--- @param buffer A buffer.
--- @param policy The combination of `buffer.VISIBLE_SLOP` and
--- `buffer.VISIBLE_STRICT` policy flags to set.
--- @param y The number of lines from the vertical margins to keep the caret.
-function set_visible_policy(buffer, policy, y) end
-
----
--- Overrides the background color of whitespace with color *color*, in
--- "0xBBGGRR" format, if *use_setting* is `true`.
--- @param buffer A buffer.
--- @param use_setting Whether or not to use *color*.
--- @param color The color in "0xBBGGRR" format.
-function set_whitespace_back(buffer, use_setting, color) end
-
----
--- Overrides the foreground color of whitespace with color *color*, in
--- "0xBBGGRR" format, if *use_setting* is `true`.
--- @param use_setting Whether or not to use *color*.
--- @param color The color in "0xBBGGRR" format.
-function set_whitespace_fore(buffer, use_setting, color) end
-
----
--- Defines scrolling policy bit-mask *policy* as the policy for keeping the
--- caret *x* number of pixels away from the horizontal margins.
--- @param buffer A buffer.
--- @param policy The combination of `buffer.CARET_SLOP`, `buffer.CARET_STRICT`,
--- `buffer.CARET_EVEN`, and `buffer.CARET_JUMPS` policy flags to set.
--- @param x The number of pixels from the horizontal margins to keep the caret.
-function set_x_caret_policy(buffer, policy, x) end
-
----
--- Defines scrolling policy bit-mask *policy* as the policy for keeping the
--- caret *y* number of lines away from the vertical margins.
--- @param buffer A buffer.
--- @param policy The combination of `buffer.CARET_SLOP`, `buffer.CARET_STRICT`,
--- `buffer.CARET_EVEN`, and `buffer.CARET_JUMPS` policy flags to set.
--- @param y The number of lines from the vertical margins to keep the caret.
-function set_y_caret_policy(buffer, policy, y) end
-
----
--- Shows the range of lines between line numbers *start_line* to *end_line*.
--- This has no effect on fold levels or fold flags and the first line cannot be
--- hidden.
--- @param buffer A buffer.
--- @param start_line The start line of the range of lines in *buffer* to show.
--- @param end_line The end line of the range of lines in *buffer* to show.
-function show_lines(buffer, start_line, end_line) end
-
----
-- Begins styling at position *position* with styling bit-mask *style_mask*.
-- *style_mask* specifies which style bits can be set with
-- `buffer.set_styling()`.
@@ -2836,16 +1588,6 @@ function stuttered_page_up(buffer) end
function stuttered_page_up_extend(buffer) end
---
--- Reverts all styles to having the same properties as `buffer.STYLE_DEFAULT`.
--- @param buffer A buffer.
-function style_clear_all(buffer) end
-
----
--- Resets `buffer.STYLE_DEFAULT` to its initial state.
--- @param buffer A buffer.
-function style_reset_default(buffer) end
-
----
-- Swaps the main selection's beginning and end positions.
-- @param buffer A buffer.
function swap_main_anchor_caret(buffer) end
@@ -2869,22 +1611,6 @@ function target_from_selection(buffer) end
function target_whole_document(buffer) end
---
--- Returns the pixel height of line number *line*.
--- @param buffer A buffer.
--- @param line The line number in *buffer* to get the pixel height of.
--- @return number
-function text_height(buffer, line) end
-
----
--- Returns the pixel width string *text* would have when styled with style
--- number *style_num*, in the range of `1` to `256`.
--- @param buffer A buffer.
--- @param style_num The style number between `1` and `256` to use.
--- @param text The text to measure the width of.
--- @return number
-function text_width(buffer, style_num, text) end
-
----
-- Cycles between `buffer.caret_sticky` option settings `buffer.CARETSTICKY_ON`
-- and `buffer.CARETSTICKY_OFF`.
-- @param buffer A buffer.
@@ -2892,26 +1618,6 @@ function text_width(buffer, style_num, text) end
function toggle_caret_sticky(buffer) end
---
--- Toggles the fold point on line number *line* between expanded (where all of
--- its child lines are displayed) and contracted (where all of its child lines
--- are hidden).
--- @param buffer A buffer.
--- @param line The line number in *buffer* to toggle the fold on.
--- @see set_default_fold_display_text
-function toggle_fold(buffer, line) end
-
----
--- Toggles a fold point on line number *line* between expanded (where all of
--- its child lines are displayed) and contracted (where all of its child lines
--- are hidden), and shows string *text* after the line.
--- *text* is drawn with style number `buffer.STYLE_FOLDDISPLAYTEXT`.
--- @param buffer A buffer.
--- @param line The line number in *buffer* to toggle the fold on and display
--- *text* after.
--- @param text The text to display after the line.
-function toggle_fold_show_text(buffer, line, text) end
-
----
-- Undoes the most recent action.
-- @param buffer A buffer.
function undo(buffer) end
@@ -2978,21 +1684,6 @@ function vc_home_wrap(buffer) end
function vc_home_wrap_extend(buffer) end
---
--- Centers current line in the view.
--- @param buffer A buffer.
-function vertical_centre_caret(buffer) end
-
----
--- Returns the displayed line number of actual line number *line*, taking hidden
--- lines into account, or `-1` if *line* is outside the range of lines in the
--- buffer.
--- Lines can occupy more than one display line if they wrap.
--- @param buffer A buffer.
--- @param line The line number in *buffer* to use.
--- @return number
-function visible_from_doc_line(buffer, line) end
-
----
-- Returns the position of the end of the word at position *pos*.
-- `buffer.word_chars` contains the set of characters that constitute words. If
-- *pos* has a non-word character to its right and *only_word_chars* is `false`,
@@ -3106,24 +1797,6 @@ function word_right_extend(buffer) end
-- terminated by the start or end of the buffer.
function word_start_position(buffer, pos, only_word_chars) end
----
--- Returns the number of wrapped lines needed to fully display line number
--- *line*.
--- @param buffer A buffer.
--- @param line The line number in *buffer* to use.
--- @return number
-function wrap_count(buffer, line) end
-
----
--- Increases the size of all fonts by one point, up to 20.
--- @param buffer A buffer.
-function zoom_in(buffer) end
-
----
--- Decreases the size of all fonts by one point, down to -10.
--- @param buffer A buffer.
-function zoom_out(buffer) end
-
-- External functions.
---
@@ -3262,7 +1935,6 @@ function set_theme(buffer, name, props) end
-- * margin_styles
-- * max_line_state
-- * mod_event_mask
--- * modify
-- * mouse_down_captures
-- * paste_convert_endings
-- * phases_draw
diff --git a/core/.iconv.luadoc b/core/.iconv.luadoc
index 0b8362e4..162938e8 100644
--- a/core/.iconv.luadoc
+++ b/core/.iconv.luadoc
@@ -1,4 +1,4 @@
--- Copyright 2007-2018 Mitchell mitchell.att.foicica.com. See LICENSE.
+-- Copyright 2007-2020 Mitchell mitchell.att.foicica.com. See LICENSE.
-- This is a DUMMY FILE used for making LuaDoc for built-in functions in the
-- string table.
diff --git a/core/.os.luadoc b/core/.os.luadoc
index fa118b0c..69132e6f 100644
--- a/core/.os.luadoc
+++ b/core/.os.luadoc
@@ -1,4 +1,4 @@
--- Copyright 2007-2018 Mitchell mitchell.att.foicica.com. See LICENSE.
+-- Copyright 2007-2020 Mitchell mitchell.att.foicica.com. See LICENSE.
-- This is a DUMMY FILE used for making LuaDoc for built-in functions in the
-- os table.
diff --git a/core/.ui.dialogs.luadoc b/core/.ui.dialogs.luadoc
index ac5bb7b5..aa7e6b77 100644
--- a/core/.ui.dialogs.luadoc
+++ b/core/.ui.dialogs.luadoc
@@ -1,4 +1,4 @@
--- Copyright 2007-2018 Mitchell mitchell.att.foicica.com. See LICENSE.
+-- Copyright 2007-2020 Mitchell mitchell.att.foicica.com. See LICENSE.
-- This is a DUMMY FILE used for making LuaDoc for built-in functions in the
-- ui.dialogs table.
diff --git a/core/.view.luadoc b/core/.view.luadoc
index bf190ee3..7f1477af 100644
--- a/core/.view.luadoc
+++ b/core/.view.luadoc
@@ -1,10 +1,916 @@
--- Copyright 2007-2018 Mitchell mitchell.att.foicica.com. See LICENSE.
+-- Copyright 2007-2020 Mitchell mitchell.att.foicica.com. See LICENSE.
-- This is a DUMMY FILE used for making LuaDoc for Views.
---
-- A Textadept view object.
+-- Constants are documented in the fields they apply to.
+-- While you can work with individual view instances, it is often useful to work
+-- with just the global one.
+-- Many of these functions and fields are derived from view-specific
+-- functionality the Scintilla editing component, and additional information can
+-- be found on the Scintilla website:
+-- [http://scintilla.org/ScintillaDoc.html](
+-- http://scintilla.org/ScintillaDoc.html)
+-- Note that with regard to Scintilla-specific functionality, this API is a
+-- _suggestion_, not a hard requirement. All of that functionality also exists
+-- in [`buffer`](), even if undocumented.
+-- @field additional_caret_fore (number)
+-- The foreground color, in "0xBBGGRR" format, of additional carets.
+-- @field additional_carets_blink (bool)
+-- Allow additional carets to blink.
+-- The default value is `true`.
+-- @field additional_carets_visible (bool)
+-- Display additional carets.
+-- The default value is `true`.
+-- @field additional_sel_alpha (number)
+-- The alpha value, ranging from `0` (transparent) to `255` (opaque), of
+-- additional selections.
+-- The default value is `view.ALPHA_NOALPHA`, for no alpha.
+-- @field additional_sel_back (number, Write-only)
+-- The background color, in "0xBBGGRR" format, of additional selections.
+-- This field has no effect when calling `view:set_sel_back(false, ...)`.
+-- @field additional_sel_fore (number, Write-only)
+-- The foreground color, in "0xBBGGRR" format, of additional selections.
+-- This field has no effect when calling `view:set_sel_fore(false, ...)`.
+-- @field all_lines_visible (bool, Read-only)
+-- Whether or not all lines are visible.
+-- @field annotation_visible (number)
+-- The annotation visibility mode.
+--
+-- * `view.ANNOTATION_HIDDEN`
+-- Annotations are invisible.
+-- * `view.ANNOTATION_STANDARD`
+-- Draw annotations left-justified with no decoration.
+-- * `view.ANNOTATION_BOXED`
+-- Indent annotations to match the annotated text and outline them with a
+-- box.
+-- * `view.ANNOTATION_INDENTED`
+-- Indent non-decorated annotations to match the annotated text.
+--
+-- The default value is `view.ANNOTATION_HIDDEN`.
+-- @field auto_c_max_height (number)
+-- The maximum number of items per page to show in autocompletion and user
+-- lists. The default value is `5`.
+-- @field auto_c_max_width (number)
+-- The maximum number of characters per item to show in autocompletion and
+-- user lists.
+-- The default value is `0`, which automatically sizes the width to fit the
+-- longest item.
+-- @field call_tip_fore_hlt (number, Write-only)
+-- A call tip's highlighted text foreground color, in "0xBBGGRR" format.
+-- @field call_tip_position (boolean)
+-- Display a call tip above the current line instead of below it.
+-- The default value is `false`.
+-- @field call_tip_use_style (number)
+-- The pixel width of tab characters in call tips.
+-- When non-zero, also enables the use of style number `view.STYLE_CALLTIP`
+-- instead of `view.STYLE_DEFAULT` for call tip styles.
+-- The default value is `0`.
+-- @field caret_fore (number)
+-- The caret's foreground color, in "0xBBGGRR" format.
+-- @field caret_line_back (number)
+-- The background color, in "0xBBGGRR" format, of the line that contains the
+-- caret.
+-- @field caret_line_back_alpha (number)
+-- The caret line's background alpha value, ranging from `0` (transparent) to
+-- `255` (opaque).
+-- The default value is `view.ALPHA_NOALPHA`, for no alpha.
+-- @field caret_line_frame (number)
+-- The caret line's frame width in pixels.
+-- When non-zero, the line that contains the caret is framed instead of
+-- colored in. The `view.caret_line_back` and `view.caret_line_back_alpha`
+-- properties apply to the frame.
+-- The default value is `0`.
+-- @field caret_line_visible (bool)
+-- Color the background of the line that contains the caret a different color.
+-- The default value is `false`.
+-- @field caret_line_visible_always (bool)
+-- Always show the caret line, even when the window is not in focus.
+-- The default value is `false`, showing the line only when the window is in
+-- focus.
+-- @field caret_period (number)
+-- The time between caret blinks in milliseconds.
+-- A value of `0` stops blinking.
+-- The default value is `500`.
+-- @field caret_style (number)
+-- The caret's visual style.
+--
+-- * `view.CARETSTYLE_INVISIBLE`
+-- No caret.
+-- * `view.CARETSTYLE_LINE`
+-- A line caret.
+-- * `view.CARETSTYLE_BLOCK`
+-- A block caret.
+--
+-- Any block setting may be combined with `view.CARETSTYLE_BLOCK_AFTER` via
+-- bitwise OR (`|`) in order to draw the caret after the end of a selection,
+-- as opposed to just inside it.
+--
+-- The default value is `view.CARETSTYLE_LINE`.
+-- @field caret_width (number)
+-- The line caret's pixel width in insert mode, either `0`, `1`, `2`, or `3`.
+-- The default value is `1`.
+-- @field cursor (number)
+-- The display cursor type.
+--
+-- * `view.CURSORNORMAL`
+-- The text insert cursor.
+-- * `view.CURSORARROW`
+-- The arrow cursor.
+-- * `view.CURSORWAIT`
+-- The wait cursor.
+-- * `view.CURSORREVERSEARROW`
+-- The reversed arrow cursor.
+--
+-- The default value is `view.CURSORNORMAL`.
+-- @field edge_colour (number)
+-- The color, in "0xBBGGRR" format, of the single edge or background for long
+-- lines according to `view.edge_mode`.
+-- @field edge_column (number)
+-- The column number to mark long lines at.
+-- @field edge_mode (number)
+-- The long line mark mode.
+--
+-- * `view.EDGE_NONE`
+-- Long lines are not marked.
+-- * `view.EDGE_LINE`
+-- Draw a single vertical line whose color is [`view.edge_colour`]() at
+-- column [`view.edge_column`]().
+-- * `view.EDGE_BACKGROUND`
+-- Change the background color of text after column [`view.edge_column`]()
+-- to [`view.edge_colour`]().
+-- * `view.EDGE_MULTILINE`
+-- Draw vertical lines whose colors and columns are defined by calls to
+-- [`view:multi_edge_add_line()`]().
+-- @field end_at_last_line (bool)
+-- Disable scrolling past the last line.
+-- The default value is `true`.
+-- @field extra_ascent (number)
+-- The amount of pixel padding above lines.
+-- The default value is `0`.
+-- @field extra_descent (number)
+-- The amount of pixel padding below lines.
+-- The default is `0`.
+-- @field first_visible_line (number)
+-- The line number of the line at the top of the view.
+-- @field fold_display_text_style (number)
+-- The fold display text mode.
+--
+-- * `view.FOLDDISPLAYTEXT_HIDDEN`
+-- Fold display text is not shown.
+-- * `view.FOLDDISPLAYTEXT_STANDARD`
+-- Fold display text is shown with no decoration.
+-- * `view.FOLDDISPLAYTEXT_BOXED`
+-- Fold display text is shown outlined with a box.
+--
+-- The default value is `view.FOLDDISPLAYTEXT_HIDDEN`.
+-- @field fold_expanded (table)
+-- Table of flags per line number that indicate whether or not fold points are
+-- expanded for those line numbers.
+-- Setting expanded fold states does not toggle folds; it only updates fold
+-- margin markers. Use [`view.toggle_fold()`]() instead.
+-- @field fold_flags (number, Read-only)
+-- Bit-mask of folding lines to draw in the buffer.
+--
+-- * `view.FOLDFLAG_LINEBEFORE_EXPANDED`
+-- Draw lines above expanded folds.
+-- * `view.FOLDFLAG_LINEBEFORE_CONTRACTED`
+-- Draw lines above collapsed folds.
+-- * `view.FOLDFLAG_LINEAFTER_EXPANDED`
+-- Draw lines below expanded folds.
+-- * `view.FOLDFLAG_LINEAFTER_CONTRACTED`
+-- Draw lines below collapsed folds.
+-- * `view.FOLDFLAG_LEVELNUMBERS`
+-- Show hexadecimal fold levels in line margins.
+-- This option cannot be combined with `FOLDFLAG_LINESTATE`.
+-- * `view.FOLDFLAG_LINESTATE`
+-- Show line state in line margins.
+-- This option cannot be combined with `FOLDFLAG_LEVELNUMBERS`.
+--
+-- The default value is `0`.
+-- @field h_scroll_bar (bool)
+-- Display the horizontal scroll bar.
+-- The default value is `true`.
+-- @field highlight_guide (number)
+-- The indentation guide column number to also highlight when highlighting
+-- matching braces, or `0` to stop indentation guide highlighting.
+-- @field idle_styling (number)
+-- The idle styling mode.
+-- This mode has no effect when `view.wrap_mode` is on.
+--
+-- * `view.IDLESTYLING_NONE`
+-- Style all the currently visible text before displaying it.
+-- * `view.IDLESTYLING_TOVISIBLE`
+-- Style some text before displaying it and then style the rest
+-- incrementally in the background as an idle-time task.
+-- * `view.IDLESTYLING_AFTERVISIBLE`
+-- Style text after the currently visible portion in the background.
+-- * `view.IDLESTYLING_ALL`
+-- Style text both before and after the visible text in the background.
+--
+-- The default value is `view.IDLESTYLING_NONE`.
+-- @field indentation_guides (number)
+-- The indentation guide drawing mode.
+-- Indentation guides are dotted vertical lines that appear within indentation
+-- whitespace at each level of indentation.
+--
+-- * `view.IV_NONE`
+-- Does not draw any guides.
+-- * `view.IV_REAL`
+-- Draw guides only within indentation whitespace.
+-- * `view.IV_LOOKFORWARD`
+-- Draw guides beyond the current line up to the next non-empty line's
+-- indentation level, but with an additional level if the previous non-empty
+-- line is a fold point.
+-- * `view.IV_LOOKBOTH`
+-- Draw guides beyond the current line up to either the indentation level of
+-- the previous or next non-empty line, whichever is greater.
+--
+-- The default value is `view.IV_NONE`.
+-- @field indic_alpha (table)
+-- Table of fill color alpha values, ranging from `0` (transparent) to `255`
+-- (opaque), for indicator numbers from `1` to `32` whose styles are either
+-- `INDIC_ROUNDBOX`, `INDIC_STRAIGHTBOX`, or `INDIC_DOTBOX`.
+-- The default values are `view.ALPHA_NOALPHA`, for no alpha.
+-- @field indic_fore (table)
+-- Table of foreground colors, in "0xBBGGRR" format, for indicator numbers
+-- from `1` to `32`.
+-- Changing an indicator's foreground color resets that indicator's hover
+-- foreground color.
+-- @field indic_hover_fore (table)
+-- Table of hover foreground colors, in "0xBBGGRR" format, for indicator
+-- numbers from `1` to `32`.
+-- The default values are the respective indicator foreground colors.
+-- @field indic_hover_style (table)
+-- Table of hover styles for indicators numbers from `1` to `32`. An
+-- indicator's hover style drawn when either the cursor hovers over that
+-- indicator or the caret is within that indicator.
+-- The default values are the respective indicator styles.
+-- @field indic_outline_alpha (table)
+-- Table of outline color alpha values, ranging from `0` (transparent) to
+-- `255` (opaque), for indicator numbers from `1` to `32` whose styles are
+-- either `INDIC_ROUNDBOX`, `INDIC_STRAIGHTBOX`, or `INDIC_DOTBOX`.
+-- The default values are `view.ALPHA_NOALPHA`, for no alpha.
+-- @field indic_style (table)
+-- Table of styles for indicator numbers from `1` to `32`.
+--
+-- * `view.INDIC_PLAIN`
+-- An underline.
+-- * `view.INDIC_SQUIGGLE`
+-- A squiggly underline 3 pixels in height.
+-- * `view.INDIC_TT`
+-- An underline of small 'T' shapes.
+-- * `view.INDIC_DIAGONAL`
+-- An underline of diagonal hatches.
+-- * `view.INDIC_STRIKE`
+-- Strike out.
+-- * `view.INDIC_HIDDEN`
+-- Invisible.
+-- * `view.INDIC_BOX`
+-- A bounding box.
+-- * `view.INDIC_ROUNDBOX`
+-- A translucent box with rounded corners around the text. Use
+-- [`view.indic_alpha`]() and [`view.indic_outline_alpha`]() to set the
+-- fill and outline transparency, respectively. Their default values are
+-- `30` and `50`.
+-- * `view.INDIC_STRAIGHTBOX`
+-- Similar to `INDIC_ROUNDBOX` but with sharp corners.
+-- * `view.INDIC_DASH`
+-- A dashed underline.
+-- * `view.INDIC_DOTS`
+-- A dotted underline.
+-- * `view.INDIC_SQUIGGLELOW`
+-- A squiggly underline 2 pixels in height.
+-- * `view.INDIC_DOTBOX`
+-- Similar to `INDIC_STRAIGHTBOX` but with a dotted outline.
+-- Translucency alternates between [`view.indic_alpha`]() and
+-- [`view.indic_outline_alpha`]() starting with the top-left pixel.
+-- * `view.INDIC_SQUIGGLEPIXMAP`
+-- Identical to `INDIC_SQUIGGLE` but draws faster by using a pixmap instead
+-- of multiple line segments.
+-- * `view.INDIC_COMPOSITIONTHICK`
+-- A 2-pixel thick underline at the bottom of the line inset by 1 pixel on
+-- on either side. Similar in appearance to the target in Asian language
+-- input composition.
+-- * `view.INDIC_COMPOSITIONTHIN`
+-- A 1-pixel thick underline just before the bottom of the line inset by 1
+-- pixel on either side. Similar in appearance to the non-target ranges in
+-- Asian language input composition.
+-- * `view.INDIC_FULLBOX`
+-- Similar to `INDIC_STRAIGHTBOX` but extends to the top of its line,
+-- potentially touching any similar indicators on the line above.
+-- * `view.INDIC_TEXTFORE`
+-- Changes the color of text to an indicator's foreground color.
+-- * `view.INDIC_POINT`
+-- A triangle below the start of the indicator range.
+-- * `view.INDIC_POINTCHARACTER`
+-- A triangle below the centre of the first character of the indicator
+-- range.
+-- * `view.INDIC_GRADIENT`
+-- A box with a vertical gradient from solid on top to transparent on
+-- bottom.
+-- * `view.INDIC_GRADIENTCENTRE`
+-- A box with a centered gradient from solid in the middle to transparent on
+-- the top and bottom.
+--
+-- Use [`_SCINTILLA.next_indic_number()`]() for custom indicators.
+-- Changing an indicator's style resets that indicator's hover style.
+-- @field indic_under (table)
+-- Table of flags that indicate whether or not to draw indicators behind text
+-- instead of over the top of it for indicator numbers from `1` to `32`.
+-- The default values are `false`.
+-- @field line_visible (table, Read-only)
+-- Table of flags per line number that indicate whether or not lines are
+-- visible for those line numbers.
+-- @field lines_on_screen (number, Read-only)
+-- The number of completely visible lines in the view.
+-- It is possible to have a partial line visible at the bottom of the view.
+-- @field margins (number)
+-- The number of margins.
+-- The default value is `5`.
+-- @field margin_back_n (table)
+-- Table of background colors, in "0xBBGGRR" format, of margin numbers from
+-- `1` to `view.margins` (`5` by default).
+-- Only affects margins of type `view.MARGIN_COLOUR`.
+-- @field margin_cursor_n (table)
+-- Table of cursor types shown over margin numbers from `1` to
+-- `view.margins` (`5` by default).
+--
+-- * `view.CURSORARROW`
+-- Normal arrow cursor.
+-- * `view.CURSORREVERSEARROW`
+-- Reversed arrow cursor.
+--
+-- The default values are `view.CURSORREVERSEARROW`.
+-- @field margin_left (number)
+-- The pixel size of the left margin of the buffer text.
+-- The default value is `1`.
+-- @field margin_mask_n (table)
+-- Table of bit-masks of markers whose symbols marker symbol margins can
+-- display for margin numbers from `1` to `view.margins` (`5` by default).
+-- Bit-masks are 32-bit values whose bits correspond to the 32 available
+-- markers.
+-- The default values are `0`, `view.MASK_FOLDERS`, `0`, `0`, and `0`, for
+-- a line margin and logical marker margin.
+-- @field margin_options (number)
+-- A bit-mask of margin option settings.
+--
+-- * `view.MARGINOPTION_NONE`
+-- None.
+-- * `view.MARGINOPTION_SUBLINESELECT`
+-- Select only a wrapped line's sub-line (rather than the entire line) when
+-- the line number margin is clicked.
+--
+-- The default value is `view.MARGINOPTION_NONE`.
+-- @field margin_right (number)
+-- The pixel size of the right margin of the buffer text.
+-- The default value is `1`.
+-- @field margin_sensitive_n (table)
+-- Table of flags that indicate whether or not mouse clicks in margins emit
+-- `MARGIN_CLICK` events for margin numbers from `1` to `view.margins` (`5`
+-- by default).
+-- The default values are `false`.
+-- @field margin_type_n (table)
+-- Table of margin types for margin numbers from `1` to `view.margins` (`5`
+-- by default).
+--
+-- * `view.MARGIN_SYMBOL`
+-- A marker symbol margin.
+-- * `view.MARGIN_NUMBER`
+-- A line number margin.
+-- * `view.MARGIN_BACK`
+-- A marker symbol margin whose background color matches the default text
+-- background color.
+-- * `view.MARGIN_FORE`
+-- A marker symbol margin whose background color matches the default text
+-- foreground color.
+-- * `view.MARGIN_TEXT`
+-- A text margin.
+-- * `view.MARGIN_RTEXT`
+-- A right-justified text margin.
+-- * `view.MARGIN_COLOUR`
+-- A marker symbol margin whose background color is configurable.
+--
+-- The default value for the first margin is `view.MARGIN_NUMBER`, followed
+-- by `view.MARGIN_SYMBOL` for the rest.
+-- @field margin_width_n (table)
+-- Table of pixel margin widths for margin numbers from `1` to
+-- `view.margins` (`5` by default).
+-- @field marker_alpha (table, Write-only)
+-- Table of alpha values, ranging from `0` (transparent) to `255` (opaque),
+-- of markers drawn in the text area (not the margin) for markers numbers from
+-- `1` to `32`.
+-- The default values are `view.ALPHA_NOALPHA`, for no alpha.
+-- @field marker_back (table, Write-only)
+-- Table of background colors, in "0xBBGGRR" format, of marker numbers from
+-- `1` to `32`.
+-- @field marker_back_selected (table, Write-only)
+-- Table of background colors, in "0xBBGGRR" format, of markers whose folding
+-- blocks are selected for marker numbers from `1` to `32`.
+-- @field marker_fore (table, Write-only)
+-- Table of foreground colors, in "0xBBGGRR" format, of marker numbers from
+-- `1` to `32`.
+-- @field mouse_dwell_time (number)
+-- The number of milliseconds the mouse must idle before generating a
+-- `DWELL_START` event. A time of `view.TIME_FOREVER` will never generate
+-- one.
+-- @field mouse_selection_rectangular_switch (bool)
+-- Whether or not pressing [`view.rectangular_selection_modifier`]() when
+-- selecting text normally with the mouse turns on rectangular selection.
+-- The default value is `false`.
+-- @field rectangular_selection_modifier (number)
+-- The modifier key used in combination with a mouse drag in order to create a
+-- rectangular selection.
+--
+-- * `view.MOD_CTRL`
+-- The "Control" modifier key.
+-- * `view.MOD_ALT`
+-- The "Alt" modifier key.
+-- * `view.MOD_SUPER`
+-- The "Super" modifier key, usually defined as the left "Windows" or
+-- "Command" key.
+--
+-- The default value is `view.MOD_CTRL`.
+-- @field representation (table)
+-- The alternative string representations of characters.
+-- Representations are displayed in the same way control characters are. Use
+-- the empty string for the '\0' character when assigning its representation.
+-- Call [`view.clear_representation()`]() to remove a representation.
+-- @field rgba_image_height (number)
+-- The height of the RGBA image to be defined using
+-- [`view.marker_define_rgba_image()`]().
+-- @field rgba_image_scale (number)
+-- The scale factor in percent of the RGBA image to be defined using
+-- [`view.marker_define_rgba_image()`]().
+-- This is useful on OSX with a retina display where each display unit is 2
+-- pixels: use a factor of `200` so that each image pixel is displayed using a
+-- screen pixel. The default scale, `100`, will stretch each image pixel to
+-- cover 4 screen pixels on a retina display.
+-- @field rgba_image_width (number)
+-- The width of the RGBA image to be defined using
+-- [`view.marker_define_rgba_image()`]() and
+-- [`view.register_rgba_image()`]().
+-- @field scroll_width (number)
+-- The horizontal scrolling pixel width.
+-- For performance, the view does not measure the display width of the buffer
+-- to determine the properties of the horizontal scroll bar, but uses an
+-- assumed width instead. To ensure the width of the currently visible lines
+-- can be scrolled use [`view.scroll_width_tracking`]().
+-- The default value is `2000`.
+-- @field scroll_width_tracking (bool)
+-- Continuously update the horizontal scrolling width to match the maximum
+-- width of a displayed line beyond [`view.scroll_width`]().
+-- The default value is `false`.
+-- @field sel_alpha (number)
+-- The selection's alpha value, ranging from `0` (transparent) to `255`
+-- (opaque).
+-- The default value is `view.ALPHA_NOALPHA`, for no alpha.
+-- @field sel_eol_filled (bool)
+-- Extend the selection to the view's right margin.
+-- The default value is `false`.
-- @field size (number)
-- The split resizer's pixel position if the view is a split one.
+-- @field style_back (table)
+-- Table of background colors, in "0xBBGGRR" format, of text for style numbers
+-- from `1` to `256`.
+-- @field style_bold (table)
+-- Table of flags that indicate whether or not text is bold for style numbers
+-- from `1` to `256`.
+-- The default values are `false`.
+-- @field style_case (table)
+-- Table of letter case modes of text for style numbers from `1` to `256`.
+--
+-- * `view.CASE_MIXED`
+-- Display text in normally.
+-- * `view.CASE_UPPER`
+-- Display text in upper case.
+-- * `view.CASE_LOWER`
+-- Display text in lower case.
+-- * `view.CASE_CAMEL`
+-- Display text in camel case.
+--
+-- The default values are `view.CASE_MIXED`.
+-- @field style_changeable (table)
+-- Table of flags that indicate whether or not text is changeable for style
+-- numbers from `1` to `256`.
+-- The default values are `true`.
+-- Read-only styles do not allow the caret into the range of text.
+-- @field style_eol_filled (table)
+-- Table of flags that indicate whether or not the background colors of styles
+-- whose characters occur last on lines extend all the way to the view's right
+-- margin for style numbers from `1` to `256`.
+-- The default values are `false`.
+-- @field style_font (table)
+-- Table of string font names of text for style numbers from `1` to `256`.
+-- @field style_fore (table)
+-- Table of foreground colors, in "0xBBGGRR" format, of text for style numbers
+-- from `1` to `256`.
+-- @field style_italic (table)
+-- Table of flags that indicate whether or not text is italic for style
+-- numbers from `1` to `256`.
+-- The default values are `false`.
+-- @field style_size (table)
+-- Table of font sizes of text for style numbers from `1` to `256`.
+-- @field style_underline (table)
+-- Table of flags that indicate whether or not text is underlined for style
+-- numbers from `1` to `256`.
+-- The default values are `false`.
+-- @field style_visible (table)
+-- Table of flags that indicate whether or not text is visible for style
+-- numbers from `1` to `256`.
+-- The default values are `true`.
+-- @field tab_draw_mode (number)
+-- The draw mode of visible tabs.
+--
+-- * `view.TD_LONGARROW`
+-- An arrow that stretches until the tabstop.
+-- * `view.TD_STRIKEOUT`
+-- A horizontal line that stretches until the tabstop.
+--
+-- The default value is `view.TD_LONGARROW`.
+-- @field v_scroll_bar (bool)
+-- Display the vertical scroll bar.
+-- The default value is `true`.
+-- @field view_eol (bool)
+-- Display end of line characters.
+-- The default value is `false`.
+-- @field view_ws (number)
+-- The whitespace visibility mode.
+--
+-- * `view.WS_INVISIBLE`
+-- Whitespace is invisible.
+-- * `view.WS_VISIBLEALWAYS`
+-- Display all space characters as dots and tab characters as arrows.
+-- * `view.WS_VISIBLEAFTERINDENT`
+-- Display only non-indentation spaces and tabs as dots and arrows.
+-- * `view.WS_VISIBLEONLYININDENT`
+-- Display only indentation spaces and tabs as dots and arrows.
+--
+-- The default value is `view.WS_INVISIBLE`.
+-- @field whitespace_size (number)
+-- The pixel size of the dots that represent space characters when whitespace
+-- is visible.
+-- The default value is `1`.
+-- @field wrap_indent_mode (number)
+-- The wrapped line indent mode.
+--
+-- * `view.WRAPINDENT_FIXED`
+-- Indent wrapped lines by [`view.wrap_start_indent`]().
+-- * `view.WRAPINDENT_SAME`
+-- Indent wrapped lines the same amount as the first line.
+-- * `view.WRAPINDENT_INDENT`
+-- Indent wrapped lines one more level than the level of the first line.
+-- * `view.WRAPINDENT_DEEPINDENT`
+-- Indent wrapped lines two more levels than the level of the first line.
+--
+-- The default value is `view.WRAPINDENT_FIXED`.
+-- @field wrap_mode (number)
+-- Long line wrap mode.
+--
+-- * `view.WRAP_NONE`
+-- Long lines are not wrapped.
+-- * `view.WRAP_WORD`
+-- Wrap long lines at word (and style) boundaries.
+-- * `view.WRAP_CHAR`
+-- Wrap long lines at character boundaries.
+-- * `view.WRAP_WHITESPACE`
+-- Wrap long lines at word boundaries (ignoring style boundaries).
+--
+-- The default value is `view.WRAP_NONE`.
+-- @field wrap_start_indent (number)
+-- The number of spaces of indentation to display wrapped lines with if
+-- [`view.wrap_indent_mode`]() is `view.WRAPINDENT_FIXED`.
+-- The default value is `0`.
+-- @field wrap_visual_flags (number)
+-- The wrapped line visual flag display mode.
+--
+-- * `view.WRAPVISUALFLAG_NONE`
+-- No visual flags.
+-- * `view.WRAPVISUALFLAG_END`
+-- Show a visual flag at the end of a wrapped line.
+-- * `view.WRAPVISUALFLAG_START`
+-- Show a visual flag at the beginning of a sub-line.
+-- * `view.WRAPVISUALFLAG_MARGIN`
+-- Show a visual flag in the sub-line's line number margin.
+--
+-- The default value is `view.WRAPVISUALFLAG_NONE`.
+-- @field wrap_visual_flags_location (number)
+-- The wrapped line visual flag drawing mode.
+--
+-- * `view.WRAPVISUALFLAGLOC_DEFAULT`
+-- Draw a visual flag near the view's right margin.
+-- * `view.WRAPVISUALFLAGLOC_END_BY_TEXT`
+-- Draw a visual flag near text at the end of a wrapped line.
+-- * `view.WRAPVISUALFLAGLOC_START_BY_TEXT`
+-- Draw a visual flag near text at the beginning of a subline.
+--
+-- The default value is `view.WRAPVISUALFLAGLOC_DEFAULT`.
+-- @field x_offset (number)
+-- The horizontal scroll pixel position.
+-- A value of `0` is the normal position with the first text column visible at
+-- the left of the view.
+-- @field zoom (number)
+-- The number of points to add to the size of all fonts.
+-- Negative values are allowed.
+-- The default value is `0`.
+-- @field ANNOTATION_BOXED (number, Read-only)
+--
+-- @field ANNOTATION_HIDDEN (number, Read-only)
+--
+-- @field ANNOTATION_STANDARD (number, Read-only)
+--
+-- @field ANNOTATION_INDENTED (number, Read-only)
+--
+-- @field CARETSTYLE_BLOCK (number, Read-only)
+--
+-- @field CARETSTYLE_INVISIBLE (number, Read-only)
+--
+-- @field CARETSTYLE_LINE (number, Read-only)
+--
+-- @field CARET_EVEN (number, Read-only)
+--
+-- @field CARET_JUMPS (number, Read-only)
+--
+-- @field CARET_SLOP (number, Read-only)
+--
+-- @field CARET_STRICT (number, Read-only)
+--
+-- @field EDGE_BACKGROUND (number, Read-only)
+--
+-- @field EDGE_LINE (number, Read-only)
+--
+-- @field EDGE_MULTILINE (number, Read-only)
+--
+-- @field EDGE_NONE (number, Read-only)
+--
+-- @field FOLDACTION_CONTRACT (number, Read-only)
+--
+-- @field FOLDACTION_EXPAND (number, Read-only)
+--
+-- @field FOLDACTION_TOGGLE (number, Read-only)
+--
+-- @field FOLDDISPLAYTEXT_HIDDEN (number, Read-only)
+--
+-- @field FOLDDISPLAYTEXT_STANDARD (number, Read-only)
+--
+-- @field FOLDDISPLAYTEXT_BOXED (number, Read-only)
+--
+-- @field INDIC_BOX (number, Read-only)
+--
+-- @field INDIC_COMPOSITIONTHICK (number, Read-only)
+--
+-- @field INDIC_COMPOSITIONTHIN (number, Read-only)
+--
+-- @field INDIC_DASH (number, Read-only)
+--
+-- @field INDIC_DIAGONAL (number, Read-only)
+--
+-- @field INDIC_DOTBOX (number, Read-only)
+--
+-- @field INDIC_DOTS (number, Read-only)
+--
+-- @field INDIC_FULLBOX (number, Read-only)
+--
+-- @field INDIC_GRADIENT (number, Read-only)
+--
+-- @field INDIC_GRADIENTCENTRE (number, Read-only)
+--
+-- @field INDIC_HIDDEN (number, Read-only)
+--
+-- @field INDIC_PLAIN (number, Read-only)
+--
+-- @field INDIC_POINT (number, Read-only)
+--
+-- @field INDIC_POINTCHARACTER (number, Read-only)
+--
+-- @field INDIC_ROUNDBOX (number, Read-only)
+--
+-- @field INDIC_SQUIGGLE (number, Read-only)
+--
+-- @field INDIC_SQUIGGLELOW (number, Read-only)
+--
+-- @field INDIC_SQUIGGLEPIXMAP (number, Read-only)
+--
+-- @field INDIC_STRAIGHTBOX (number, Read-only)
+--
+-- @field INDIC_STRIKE (number, Read-only)
+--
+-- @field INDIC_TEXTFORE (number, Read-only)
+--
+-- @field INDIC_TT (number, Read-only)
+--
+-- @field MOD_ALT (number, Read-only)
+--
+-- @field MOD_CTRL (number, Read-only)
+--
+-- @field MOD_META (number, Read-only)
+--
+-- @field MOD_SHIFT (number, Read-only)
+--
+-- @field MOD_SUPER (number, Read-only)
+--
+-- @field MOUSE_DRAG (number, Read-only)
+--
+-- @field MOUSE_PRESS (number, Read-only)
+--
+-- @field MOUSE_RELEASE (number, Read-only)
+--
+-- @field WS_INVISIBLE (number, Read-only)
+--
+-- @field WS_VISIBLEAFTERINDENT (number, Read-only)
+--
+-- @field WS_VISIBLEALWAYS (number, Read-only)
+--
+-- @field WS_VISIBLEONLYININDENT (number, Read-only)
+--
+-- @field ALPHA_NOALPHA (number, Read-only)
+--
+-- @field ALPHA_OPAQUE (number, Read-only)
+--
+-- @field ALPHA_TRANSPARENT (number, Read-only)
+--
+-- @field CASE_CAMEL (number, Read-only)
+--
+-- @field CASE_LOWER (number, Read-only)
+--
+-- @field CASE_MIXED (number, Read-only)
+--
+-- @field CASE_UPPER (number, Read-only)
+--
+-- @field CURSORARROW (number, Read-only)
+--
+-- @field CURSORNORMAL (number, Read-only)
+--
+-- @field CURSORREVERSEARROW (number, Read-only)
+--
+-- @field CURSORWAIT (number, Read-only)
+--
+-- @field FOLDFLAG_LEVELNUMBERS (number, Read-only)
+--
+-- @field FOLDFLAG_LINEAFTER_CONTRACTED (number, Read-only)
+--
+-- @field FOLDFLAG_LINEAFTER_EXPANDED (number, Read-only)
+--
+-- @field FOLDFLAG_LINEBEFORE_CONTRACTED (number, Read-only)
+--
+-- @field FOLDFLAG_LINEBEFORE_EXPANDED (number, Read-only)
+--
+-- @field FOLDFLAG_LINESTATE (number, Read-only)
+--
+-- @field IV_LOOKBOTH (number, Read-only)
+--
+-- @field IV_LOOKFORWARD (number, Read-only)
+--
+-- @field IV_NONE (number, Read-only)
+--
+-- @field IV_REAL (number, Read-only)
+--
+-- @field MARGINOPTION_NONE (number, Read-only)
+--
+-- @field MARGINOPTION_SUBLINESELECT (number, Read-only)
+--
+-- @field MARGIN_BACK (number, Read-only)
+--
+-- @field MARGIN_COLOUR (number, Read-only)
+--
+-- @field MARGIN_FORE (number, Read-only)
+--
+-- @field MARGIN_NUMBER (number, Read-only)
+--
+-- @field MARGIN_RTEXT (number, Read-only)
+--
+-- @field MARGIN_SYMBOL (number, Read-only)
+--
+-- @field MARGIN_TEXT (number, Read-only)
+--
+-- @field MARK_ARROW (number, Read-only)
+--
+-- @field MARK_ARROWDOWN (number, Read-only)
+--
+-- @field MARK_ARROWS (number, Read-only)
+--
+-- @field MARK_BACKGROUND (number, Read-only)
+--
+-- @field MARK_BOOKMARK (number, Read-only)
+--
+-- @field MARK_BOXMINUS (number, Read-only)
+--
+-- @field MARK_BOXMINUSCONNECTED (number, Read-only)
+--
+-- @field MARK_BOXPLUS (number, Read-only)
+--
+-- @field MARK_BOXPLUSCONNECTED (number, Read-only)
+--
+-- @field MARK_CHARACTER (number, Read-only)
+--
+-- @field MARK_CIRCLE (number, Read-only)
+--
+-- @field MARK_CIRCLEMINUS (number, Read-only)
+--
+-- @field MARK_CIRCLEMINUSCONNECTED (number, Read-only)
+--
+-- @field MARK_CIRCLEPLUS (number, Read-only)
+--
+-- @field MARK_CIRCLEPLUSCONNECTED (number, Read-only)
+--
+-- @field MARK_DOTDOTDOT (number, Read-only)
+--
+-- @field MARK_EMPTY (number, Read-only)
+--
+-- @field MARK_FULLRECT (number, Read-only)
+--
+-- @field MARK_LCORNER (number, Read-only)
+--
+-- @field MARK_LCORNERCURVE (number, Read-only)
+--
+-- @field MARK_LEFTRECT (number, Read-only)
+--
+-- @field MARK_MINUS (number, Read-only)
+--
+-- @field MARK_PIXMAP (number, Read-only)
+--
+-- @field MARK_PLUS (number, Read-only)
+--
+-- @field MARK_RGBAIMAGE (number, Read-only)
+--
+-- @field MARK_ROUNDRECT (number, Read-only)
+--
+-- @field MARK_SHORTARROW (number, Read-only)
+--
+-- @field MARK_SMALLRECT (number, Read-only)
+--
+-- @field MARK_TCORNER (number, Read-only)
+--
+-- @field MARK_TCORNERCURVE (number, Read-only)
+--
+-- @field MARK_UNDERLINE (number, Read-only)
+--
+-- @field MARK_VERTICALBOOKMARK (number, Read-only)
+--
+-- @field MARK_VLINE (number, Read-only)
+--
+-- @field MASK_FOLDERS (number, Read-only)
+--
+-- @field TD_LONGARROW (number, Read-only)
+--
+-- @field TD_STRIKEOUT (number, Read-only)
+--
+-- @field TIME_FOREVER (number, Read-only)
+--
+-- @field WRAPINDENT_DEEPINDENT (number, Read-only)
+--
+-- @field WRAPINDENT_FIXED (number, Read-only)
+--
+-- @field WRAPINDENT_INDENT (number, Read-only)
+--
+-- @field WRAPINDENT_SAME (number, Read-only)
+--
+-- @field WRAPVISUALFLAGLOC_DEFAULT (number, Read-only)
+--
+-- @field WRAPVISUALFLAGLOC_END_BY_TEXT (number, Read-only)
+--
+-- @field WRAPVISUALFLAGLOC_START_BY_TEXT (number, Read-only)
+--
+-- @field WRAPVISUALFLAG_END (number, Read-only)
+--
+-- @field WRAPVISUALFLAG_MARGIN (number, Read-only)
+--
+-- @field WRAPVISUALFLAG_NONE (number, Read-only)
+--
+-- @field WRAPVISUALFLAG_START (number, Read-only)
+--
+-- @field WRAP_CHAR (number, Read-only)
+--
+-- @field WRAP_NONE (number, Read-only)
+--
+-- @field WRAP_WHITESPACE (number, Read-only)
+--
+-- @field WRAP_WORD (number, Read-only)
+--
+-- @field STYLE_BRACEBAD (number, Read-only)
+--
+-- @field STYLE_BRACELIGHT (number, Read-only)
+--
+-- @field STYLE_CALLTIP (number, Read-only)
+--
+-- @field STYLE_CONTROLCHAR (number, Read-only)
+--
+-- @field STYLE_DEFAULT (number, Read-only)
+--
+-- @field STYLE_FOLDDISPLAYTEXT (number, Read-only)
+--
+-- @field STYLE_INDENTGUIDE (number, Read-only)
+--
+-- @field STYLE_LINENUMBER (number, Read-only)
+--
+-- @field UPDATE_H_SCROLL (number, Read-only)
+--
+-- @field UPDATE_V_SCROLL (number, Read-only)
+--
+-- @field VISIBLE_SLOP (number, Read-only)
+--
+-- @field VISIBLE_STRICT (number, Read-only)
+--
module('view')
---
@@ -14,6 +920,463 @@ module('view')
local buffer
---
+-- Highlights the character at position *pos* as an unmatched brace character
+-- using the `'style.bracebad'` style.
+-- Removes highlighting when *pos* is `-1`.
+-- @param view A view.
+-- @param pos The position in *buffer* to highlight, or `-1` to remove the
+-- highlight.
+function brace_bad_light(view, pos) end
+
+---
+-- Highlights unmatched brace characters with indicator number *indicator*, in
+-- the range of `1 to `32`, instead of the
+-- `view.STYLE_BRACEBAD` style if *use_indicator* is `true`.
+-- @param view A view.
+-- @param use_indicator Whether or not to use an indicator.
+-- @param indicator The indicator number to use.
+function brace_bad_light_indicator(view, use_indicator, indicator) end
+
+---
+-- Highlights the characters at positions *pos1* and *pos2* as matching braces
+-- using the `'style.bracelight'` style.
+-- If indent guides are enabled, locates the column with `buffer.column` and
+-- sets `view.highlight_guide` in order to highlight the indent guide.
+-- @param view A view.
+-- @param pos1 The first position in *buffer* to highlight.
+-- @param pos2 The second position in *buffer* to highlight.
+function brace_highlight(view, pos1, pos2) end
+
+---
+-- Highlights matching brace characters with indicator number *indicator*, in
+-- the range of `1` to `32`, instead of the
+-- `view.STYLE_BRACELIGHT` style if *use_indicator* is `true`.
+-- @param view A view.
+-- @param use_indicator Whether or not to use an indicator.
+-- @param indicator The indicator number to use.
+function brace_highlight_indicator(view, use_indicator, indicator) end
+
+---
+-- Highlights a call tip's text between positions *start_pos* to *end_pos* with
+-- the color `view.call_tip_fore_hlt`.
+-- @param view A view.
+-- @param start_pos The start position in a call tip text to highlight.
+-- @param end_pos The end position in a call tip text to highlight.
+function call_tip_set_hlt(view, start_pos, end_pos) end
+
+---
+-- Clears all images registered using `view.register_image()` and
+-- `view.register_rgba_image()`.
+-- @param view A view.
+function clear_registered_images(view) end
+
+---
+-- Removes the alternate string representation for character *char*.
+-- @param view A view.
+-- @param char The character in `buffer.representations` to remove the alternate
+-- string representation for.
+function clear_representation(view, char) end
+
+---
+-- Returns the line number of the next contracted fold point starting from line
+-- number *line*, or `-1` if none exists.
+-- @param view A view.
+-- @param line The line number in *buffer* to start at.
+-- @return number
+function contracted_fold_next(view, line) end
+
+---
+-- Returns the actual line number of displayed line number *display_line*,
+-- taking hidden lines into account.
+-- If *display_line* is less than or equal to `1`, returns `1`. If
+-- *display_line* is greater than the number of displayed lines, returns
+-- `buffer.line_count`.
+-- @param view A view.
+-- @param display_line The display line number to use.
+-- @return number
+function doc_line_from_visible(view, display_line) end
+
+---
+-- Ensures line number *line* is visible by expanding any fold points hiding it.
+-- @param view A view.
+-- @param line The line number in *buffer* to ensure visible.
+function ensure_visible(view, line) end
+
+---
+-- Ensures line number *line* is visible by expanding any fold points hiding it
+-- based on the vertical caret policy previously defined in
+-- `view.set_visible_policy()`.
+-- @param view A view.
+-- @param line The line number in *buffer* to ensure visible.
+function ensure_visible_enforce_policy(view, line) end
+
+---
+-- Contracts, expands, or toggles all fold points, depending on *action*.
+-- When toggling, the state of the first fold point determines whether to
+-- expand or contract.
+-- @param view A view.
+-- @param action The fold action to perform. Valid values are:
+-- * `view.FOLDACTION_CONTRACT`
+-- * `view.FOLDACTION_EXPAND`
+-- * `view.FOLDACTION_TOGGLE`
+function fold_all(view, action) end
+
+---
+-- Contracts, expands, or toggles the fold point on line number *line*, as well
+-- as all of its children, depending on *action*.
+-- @param view A view.
+-- @param line The line number in *buffer* to set the fold states for.
+-- @param action The fold action to perform. Valid values are:
+-- * `view.FOLDACTION_CONTRACT`
+-- * `view.FOLDACTION_EXPAND`
+-- * `view.FOLDACTION_TOGGLE`
+function fold_children(view, line, action) end
+
+---
+-- Contracts, expands, or toggles the fold point on line number *line*,
+-- depending on *action*.
+-- @param view A view.
+-- @param line The line number in *buffer* to set the fold state for.
+-- @param action The fold action to perform. Valid values are:
+-- * `view.FOLDACTION_CONTRACT`
+-- * `view.FOLDACTION_EXPAND`
+-- * `view.FOLDACTION_TOGGLE`
+function fold_line(view, line, action) end
+
+---
+-- Returns the default fold display text.
+-- @param view A view.
+function get_default_fold_display_text(view) end
+
+---
+-- Hides the range of lines between line numbers *start_line* to *end_line*.
+-- This has no effect on fold levels or fold flags and the first line cannot be
+-- hidden.
+-- @param view A view.
+-- @param start_line The start line of the range of lines in *buffer* to hide.
+-- @param end_line The end line of the range of lines in *buffer* to hide.
+function hide_lines(view, start_line, end_line) end
+
+---
+-- Scrolls the buffer right *columns* columns and down *lines* lines.
+-- Negative values are allowed.
+-- @param view A view.
+-- @param columns The number of columns to scroll horizontally.
+-- @param lines The number of lines to scroll vertically.
+function line_scroll(view, columns, lines) end
+
+---
+-- Scrolls the buffer down one line, keeping the caret visible.
+-- @param view A view.
+function line_scroll_down(view) end
+
+---
+-- Scrolls the buffer up one line, keeping the caret visible.
+-- @param view A view.
+function line_scroll_up(view) end
+
+---
+-- Assigns marker symbol *symbol* to marker number *marker*, in the range of `1`
+-- to `32`.
+-- *symbol* is shown in marker symbol margins next to lines marked with
+-- *marker*.
+-- @param view A view.
+-- @param marker The marker number in the range of `1` to `32` to set *symbol*
+-- for.
+-- @param symbol The marker symbol: `buffer.MARK_*`.
+-- @see _SCINTILLA.next_marker_number
+function marker_define(view, marker, symbol) end
+
+---
+-- Associates marker number *marker*, in the range of `1` to `32`, with XPM
+-- image *pixmap*.
+-- The `view.MARK_PIXMAP` marker symbol must be assigned to *marker*.
+-- *pixmap* is shown in marker symbol margins next to lines marked with
+-- *marker*.
+-- @param view A view.
+-- @param marker The marker number in the range of `1` to `32` to define
+-- pixmap *pixmap* for.
+-- @param pixmap The string pixmap data.
+function marker_define_pixmap(view, marker, pixmap) end
+
+---
+-- Associates marker number *marker*, in the range of `1` to `32`, with RGBA
+-- image *pixels*.
+-- The dimensions for *pixels* (`view.rgba_image_width` and
+-- `view.rgba_image_height`) must have already been defined. *pixels* is a
+-- sequence of 4 byte pixel values (red, blue, green, and alpha) defining the
+-- image line by line starting at the top-left pixel.
+-- The `view.MARK_RGBAIMAGE` marker symbol must be assigned to *marker*.
+-- *pixels* is shown in symbol margins next to lines marked with *marker*.
+-- @param view A view.
+-- @param marker The marker number in the range of `1` to `32` to define RGBA
+-- data *pixels* for.
+-- @param pixels The string sequence of 4 byte pixel values starting with the
+-- pixels for the top line, with the leftmost pixel first, then continuing
+-- with the pixels for subsequent lines. There is no gap between lines for
+-- alignment reasons. Each pixel consists of, in order, a red byte, a green
+-- byte, a blue byte and an alpha byte. The colour bytes are not premultiplied
+-- by the alpha value. That is, a fully red pixel that is 25% opaque will be
+-- `[FF, 00, 00, 3F]`.
+function marker_define_rgba_image(view, marker, pixels) end
+
+---
+-- Highlights the margin fold markers for the current fold block if *enabled* is
+-- `true`.
+-- @param view A view.
+-- @param enabled Whether or not to enable highlight.
+function marker_enable_highlight(view, enabled) end
+
+---
+-- Returns the symbol assigned to marker number *marker*, in the range of `1` to
+-- `32`, used in `view.marker_define()`,
+-- `view.marker_define_pixmap()`, or `view.marker_define_rgba_image()`.
+-- @param view A view.
+-- @param marker The marker number in the range of `1` to `32` to get the symbol
+-- of.
+-- @return number
+function marker_symbol_defined(view, marker) end
+
+---
+-- Adds a new vertical line at column number *column* with color *color*, in
+-- "0xBBGGRR" format.
+-- @param view A view.
+-- @param column The column number to add a vertical line at.
+-- @param color The color in "0xBBGGRR" format.
+function multi_edge_add_line(view, column, color) end
+
+---
+-- Clears all vertical lines created by `view:multi_edge_add_line()`.
+-- @param view A view.
+function multi_edge_clear_all(view) end
+
+---
+-- Registers XPM image *xpm_data* to type number *type* for use in
+-- autocompletion and user lists.
+-- @param view A view.
+-- @param type Integer type to register the image with.
+-- @param xpm_data The XPM data as described in `view.marker_define_pixmap()`.
+function register_image(view, type, xpm_data) end
+
+---
+-- Registers RGBA image *pixels* to type number *type* for use in autocompletion
+-- and user lists.
+-- The dimensions for *pixels* (`view.rgba_image_width` and
+-- `view.rgba_image_height`) must have already been defined. *pixels* is a
+-- sequence of 4 byte pixel values (red, blue, green, and alpha) defining the
+-- image line by line starting at the top-left pixel.
+-- @param view A view.
+-- @param type Integer type to register the image with.
+-- @param pixels The RGBA data as described in
+-- `view.marker_define_rgba_image()`.
+function register_rgba_image(view, type, pixels) end
+
+---
+-- Scrolls the caret into view based on the policies previously defined in
+-- `view.set_x_caret_policy()` and `view.set_y_caret_policy()`.
+-- @param view A view.
+-- @see set_x_caret_policy
+-- @see set_y_caret_policy
+function scroll_caret(view) end
+
+---
+-- Scrolls to the end of the buffer without moving the caret.
+-- @param view A view.
+function scroll_to_end(view) end
+
+---
+-- Scrolls to the beginning of the buffer without moving the caret.
+-- @param view A view.
+function scroll_to_start(view) end
+
+---
+-- Scrolls into view the range of text between positions *primary_pos* and
+-- *secondary_pos*, with priority given to *primary_pos*.
+-- Similar to `view.scroll_caret()`, but with *primary_pos* instead of
+-- `buffer.current_pos`.
+-- This is useful for scrolling search results into view.
+-- @param view A view.
+-- @param secondary_pos The secondary range position to scroll into view.
+-- @param primary_pos The primary range position to scroll into view.
+function scroll_range(view, secondary_pos, primary_pos) end
+
+---
+-- Sets the default fold display text to string *text*.
+-- @param view A view.
+-- @param text The text to display by default next to folded lines.
+-- @see toggle_fold_show_text
+function set_default_fold_display_text(view, text) end
+
+---
+-- Overrides the fold margin's default color with color *color*, in "0xBBGGRR"
+-- format,
+-- if *use_setting* is `true`.
+-- @param view A view.
+-- @param use_setting Whether or not to use *color*.
+-- @param color The color in "0xBBGGRR" format.
+function set_fold_margin_colour(view, use_setting, color) end
+
+---
+-- Overrides the fold margin's default highlight color with color *color*, in
+-- "0xBBGGRR" format, if *use_setting* is `true`.
+-- @param view A view.
+-- @param use_setting Whether or not to use *color*.
+-- @param color The color in "0xBBGGRR" format.
+function set_fold_margin_hi_colour(view, use_setting, color) end
+
+---
+-- Overrides the selection's default background color with color *color*, in
+-- "0xBBGGRR" format, if *use_setting* is `true`.
+-- Overwrites any existing `view.additional_sel_back` color.
+-- @param view A view.
+-- @param use_setting Whether or not to use *color*.
+-- @param color The color in "0xBBGGRR" format.
+function set_sel_back(view, use_setting, color) end
+
+---
+-- Overrides the selection's default foreground color with color *color*, in
+-- "0xBBGGRR" format, if *use_setting* is `true`.
+-- Overwrites any existing `view.additional_sel_fore` color.
+-- @param view A view.
+-- @param use_setting Whether or not to use *color*.
+-- @param color The color in "0xBBGGRR" format.
+function set_sel_fore(view, use_setting, color) end
+
+---
+-- Defines scrolling policy bit-mask *policy* as the policy for keeping the
+-- caret *y* number of lines away from the vertical margins as
+-- `view.ensure_visible_enforce_policy()` redisplays hidden or folded lines.
+-- It is similar in operation to `view.set_y_caret_policy()`.
+-- @param view A view.
+-- @param policy The combination of `view.VISIBLE_SLOP` and
+-- `view.VISIBLE_STRICT` policy flags to set.
+-- @param y The number of lines from the vertical margins to keep the caret.
+function set_visible_policy(view, policy, y) end
+
+---
+-- Overrides the background color of whitespace with color *color*, in
+-- "0xBBGGRR" format, if *use_setting* is `true`.
+-- @param view A view.
+-- @param use_setting Whether or not to use *color*.
+-- @param color The color in "0xBBGGRR" format.
+function set_whitespace_back(view, use_setting, color) end
+
+---
+-- Overrides the foreground color of whitespace with color *color*, in
+-- "0xBBGGRR" format, if *use_setting* is `true`.
+-- @param use_setting Whether or not to use *color*.
+-- @param color The color in "0xBBGGRR" format.
+function set_whitespace_fore(view, use_setting, color) end
+
+---
+-- Defines scrolling policy bit-mask *policy* as the policy for keeping the
+-- caret *x* number of pixels away from the horizontal margins.
+-- @param view A view.
+-- @param policy The combination of `view.CARET_SLOP`, `view.CARET_STRICT`,
+-- `view.CARET_EVEN`, and `view.CARET_JUMPS` policy flags to set.
+-- @param x The number of pixels from the horizontal margins to keep the caret.
+function set_x_caret_policy(view, policy, x) end
+
+---
+-- Defines scrolling policy bit-mask *policy* as the policy for keeping the
+-- caret *y* number of lines away from the vertical margins.
+-- @param view A view.
+-- @param policy The combination of `view.CARET_SLOP`, `view.CARET_STRICT`,
+-- `view.CARET_EVEN`, and `view.CARET_JUMPS` policy flags to set.
+-- @param y The number of lines from the vertical margins to keep the caret.
+function set_y_caret_policy(view, policy, y) end
+
+---
+-- Shows the range of lines between line numbers *start_line* to *end_line*.
+-- This has no effect on fold levels or fold flags and the first line cannot be
+-- hidden.
+-- @param view A view.
+-- @param start_line The start line of the range of lines in *buffer* to show.
+-- @param end_line The end line of the range of lines in *buffer* to show.
+function show_lines(view, start_line, end_line) end
+
+---
+-- Reverts all styles to having the same properties as `view.STYLE_DEFAULT`.
+-- @param view A view.
+function style_clear_all(view) end
+
+---
+-- Resets `view.STYLE_DEFAULT` to its initial state.
+-- @param view A view.
+function style_reset_default(view) end
+
+---
+-- Returns the pixel height of line number *line*.
+-- @param view A view.
+-- @param line The line number in *buffer* to get the pixel height of.
+-- @return number
+function text_height(view, line) end
+
+---
+-- Returns the pixel width string *text* would have when styled with style
+-- number *style_num*, in the range of `1` to `256`.
+-- @param view A view.
+-- @param style_num The style number between `1` and `256` to use.
+-- @param text The text to measure the width of.
+-- @return number
+function text_width(view, style_num, text) end
+
+---
+-- Toggles the fold point on line number *line* between expanded (where all of
+-- its child lines are displayed) and contracted (where all of its child lines
+-- are hidden).
+-- @param view A view.
+-- @param line The line number in *buffer* to toggle the fold on.
+-- @see set_default_fold_display_text
+function toggle_fold(view, line) end
+
+---
+-- Toggles a fold point on line number *line* between expanded (where all of
+-- its child lines are displayed) and contracted (where all of its child lines
+-- are hidden), and shows string *text* after the line.
+-- *text* is drawn with style number `view.STYLE_FOLDDISPLAYTEXT`.
+-- @param view A view.
+-- @param line The line number in *buffer* to toggle the fold on and display
+-- *text* after.
+-- @param text The text to display after the line.
+function toggle_fold_show_text(view, line, text) end
+
+---
+-- Centers current line in the view.
+-- @param view A view.
+function vertical_centre_caret(view) end
+
+---
+-- Returns the displayed line number of actual line number *line*, taking hidden
+-- lines into account, or `-1` if *line* is outside the range of lines in the
+-- buffer.
+-- Lines can occupy more than one display line if they wrap.
+-- @param view A view.
+-- @param line The line number in *buffer* to use.
+-- @return number
+function visible_from_doc_line(view, line) end
+
+---
+-- Returns the number of wrapped lines needed to fully display line number
+-- *line*.
+-- @param view A view.
+-- @param line The line number in *buffer* to use.
+-- @return number
+function wrap_count(view, line) end
+
+---
+-- Increases the size of all fonts by one point, up to 20.
+-- @param view A view.
+function zoom_in(view) end
+
+---
+-- Decreases the size of all fonts by one point, down to -10.
+-- @param view A view.
+function zoom_out(view) end
+
+-- External functions.
+
+---
-- Splits the view into top and bottom views (unless *vertical* is `true`),
-- focuses the new view, and returns both the old and new views.
-- If *vertical* is `false`, splits the view vertically into left and
diff --git a/core/events.lua b/core/events.lua
index 37dbc7b3..4a45b8ec 100644
--- a/core/events.lua
+++ b/core/events.lua
@@ -89,10 +89,10 @@ local M = {}
--
-- * _`position`_: The position double-clicked.
-- * _`line`_: The line number of the position double-clicked.
--- * _`modifiers`_: A bit-mask of any modifier keys used: `buffer.MOD_CTRL`,
--- `buffer.MOD_SHIFT`, `buffer.MOD_ALT`, and `buffer.MOD_META`.
--- Note: If you set `buffer.rectangular_selection_modifier` to
--- `buffer.MOD_CTRL`, the "Control" modifier is reported as *both* "Control"
+-- * _`modifiers`_: A bit-mask of any modifier keys used: `view.MOD_CTRL`,
+-- `view.MOD_SHIFT`, `view.MOD_ALT`, and `view.MOD_META`.
+-- Note: If you set `view.rectangular_selection_modifier` to
+-- `view.MOD_CTRL`, the "Control" modifier is reported as *both* "Control"
-- and "Alt" due to a Scintilla limitation with GTK.
-- @field CSI (string)
-- Emitted when the terminal version receives an unrecognized CSI sequence.
@@ -112,7 +112,7 @@ local M = {}
-- * _`x`_: The x-coordinate of the mouse in the view.
-- * _`y`_: The y-coordinate of the mouse in the view.
-- @field DWELL_START (string)
--- Emitted when the mouse is stationary for [`buffer.mouse_dwell_time`]()
+-- Emitted when the mouse is stationary for [`view.mouse_dwell_time`]()
-- milliseconds.
-- Arguments:
--
@@ -138,10 +138,10 @@ local M = {}
-- Arguments:
--
-- * _`position`_: The clicked text's position.
--- * _`modifiers`_: A bit-mask of any modifier keys used: `buffer.MOD_CTRL`,
--- `buffer.MOD_SHIFT`, `buffer.MOD_ALT`, and `buffer.MOD_META`.
--- Note: If you set `buffer.rectangular_selection_modifier` to
--- `buffer.MOD_CTRL`, the "Control" modifier is reported as *both* "Control"
+-- * _`modifiers`_: A bit-mask of any modifier keys used: `view.MOD_CTRL`,
+-- `view.MOD_SHIFT`, `view.MOD_ALT`, and `view.MOD_META`.
+-- Note: If you set `view.rectangular_selection_modifier` to
+-- `view.MOD_CTRL`, the "Control" modifier is reported as *both* "Control"
-- and "Alt" due to a Scintilla limitation with GTK.
-- @field INDICATOR_RELEASE (string)
-- Emitted when releasing the mouse after clicking on text that has an
@@ -168,10 +168,10 @@ local M = {}
--
-- * _`margin`_: The margin number clicked.
-- * _`position`_: The beginning position of the clicked margin's line.
--- * _`modifiers`_: A bit-mask of any modifier keys used: `buffer.MOD_CTRL`,
--- `buffer.MOD_SHIFT`, `buffer.MOD_ALT`, and `buffer.MOD_META`.
--- Note: If you set `buffer.rectangular_selection_modifier` to
--- `buffer.MOD_CTRL`, the "Control" modifier is reported as *both* "Control"
+-- * _`modifiers`_: A bit-mask of any modifier keys used: `view.MOD_CTRL`,
+-- `view.MOD_SHIFT`, `view.MOD_ALT`, and `view.MOD_META`.
+-- Note: If you set `view.rectangular_selection_modifier` to
+-- `view.MOD_CTRL`, the "Control" modifier is reported as *both* "Control"
-- and "Alt" due to a Scintilla limitation with GTK.
-- @field MENU_CLICKED (string)
-- Emitted after selecting a menu item.
@@ -187,8 +187,8 @@ local M = {}
-- has switched to.)
-- Arguments:
--
--- * _`event`_: The mouse event: `buffer.MOUSE_PRESS`, `buffer.MOUSE_DRAG`, or
--- `buffer.MOUSE_RELEASE`.
+-- * _`event`_: The mouse event: `view.MOUSE_PRESS`, `view.MOUSE_DRAG`, or
+-- `view.MOUSE_RELEASE`.
-- * _`button`_: The mouse button number.
-- * _`y`_: The y-coordinate of the mouse event, starting from 1.
-- * _`x`_: The x-coordinate of the mouse event, starting from 1.
@@ -264,9 +264,9 @@ local M = {}
-- Buffer contents, styling, or markers have changed.
-- + `buffer.UPDATE_SELECTION`
-- Buffer selection has changed (including caret movement).
--- + `buffer.UPDATE_V_SCROLL`
+-- + `view.UPDATE_V_SCROLL`
-- Buffer has scrolled vertically.
--- + `buffer.UPDATE_H_SCROLL`
+-- + `view.UPDATE_H_SCROLL`
-- Buffer has scrolled horizontally.
-- @field URI_DROPPED (string)
-- Emitted after dragging and dropping a URI into a view.
@@ -290,8 +290,8 @@ local M = {}
-- Emitted right after switching to another view.
-- Emitted by [`ui.goto_view()`]().
-- @field ZOOM (string)
--- Emitted after changing [`buffer.zoom`]().
--- Emitted by [`buffer.zoom_in()`]() and [`buffer.zoom_out()`]().
+-- Emitted after changing [`view.zoom`]().
+-- Emitted by [`view.zoom_in()`]() and [`view.zoom_out()`]().
module('events')]]
-- Map of event names to tables of handler functions.
diff --git a/core/file_io.lua b/core/file_io.lua
index 7a7d841b..f90c51ab 100644
--- a/core/file_io.lua
+++ b/core/file_io.lua
@@ -167,7 +167,7 @@ end
local function reload(buffer)
if not buffer then buffer = _G.buffer end
if not buffer.filename then return end
- local pos, first_visible_line = buffer.current_pos, buffer.first_visible_line
+ local pos, first_visible_line = buffer.current_pos, view.first_visible_line
local f = assert(io.open(buffer.filename, 'rb'))
local text = f:read('a')
f:close()
@@ -177,14 +177,14 @@ local function reload(buffer)
buffer.mod_time = lfs.attributes(buffer.filename, 'modification')
if buffer == _G.buffer then
buffer:goto_pos(pos)
- buffer.first_visible_line = first_visible_line
+ view.first_visible_line = first_visible_line
end
end
-- LuaDoc is in core/.buffer.luadoc.
local function set_encoding(buffer, encoding)
assert_type(encoding, 'string/nil', 1)
- local pos, first_visible_line = buffer.current_pos, buffer.first_visible_line
+ local pos, first_visible_line = buffer.current_pos, view.first_visible_line
local text = buffer:get_text()
if buffer.encoding then
text = text:iconv(buffer.encoding, 'UTF-8')
@@ -193,7 +193,7 @@ local function set_encoding(buffer, encoding)
if encoding then text = text:iconv('UTF-8', encoding) end
buffer:set_text(text)
buffer:goto_pos(pos)
- buffer.first_visible_line = first_visible_line
+ view.first_visible_line = first_visible_line
buffer.encoding = encoding
buffer.code_page = buffer.encoding and buffer.CP_UTF8 or 0
end
diff --git a/core/iface.lua b/core/iface.lua
index fdaab1ed..05e80131 100644
--- a/core/iface.lua
+++ b/core/iface.lua
@@ -52,11 +52,11 @@ M.events = {[2000]={"style_needed","position"},[2001]={"char_added","ch","charac
local marker_number, indic_number, list_type, image_type = 0, 0, 0, 0
---
--- Returns a unique marker number for use with `buffer.marker_define()`.
+-- Returns a unique marker number for use with `view.marker_define()`.
-- Use this function for custom markers in order to prevent clashes with
-- identifiers of other custom markers.
-- @usage local marknum = _SCINTILLA.next_marker_number()
--- @see buffer.marker_define
+-- @see view.marker_define
-- @name next_marker_number
function M.next_marker_number()
assert(marker_number < M.constants.MARKER_MAX, 'too many markers in use')
@@ -69,7 +69,7 @@ end
-- Use this function for custom indicators in order to prevent clashes with
-- identifiers of other custom indicators.
-- @usage local indic_num = _SCINTILLA.next_indic_number()
--- @see buffer.indic_style
+-- @see view.indic_style
-- @name next_indic_number
function M.next_indic_number()
assert(indic_number < M.constants.INDICATOR_MAX, 'too many indicators in use')
@@ -92,12 +92,12 @@ end
---
-- Returns a unique image type identier number for use with
--- `buffer.register_image()` and `buffer.register_rgba_image()`.
+-- `view.register_image()` and `view.register_rgba_image()`.
-- Use this function for custom image types in order to prevent clashes with
-- identifiers of other custom image types.
-- @usage local image_type = _SCINTILLA.next_image_type()
--- @see buffer.register_image
--- @see buffer.register_rgba_image
+-- @see view.register_image
+-- @see view.register_rgba_image
-- @name next_image_type
function M.next_image_type()
image_type = image_type + 1
diff --git a/core/ui.lua b/core/ui.lua
index 1ec21be1..aa685e14 100644
--- a/core/ui.lua
+++ b/core/ui.lua
@@ -40,27 +40,27 @@ ui.silent_print = false
-- Helper function for printing messages to buffers.
-- @see ui._print
local function _print(buffer_type, ...)
- local print_buffer
- for _, buffer in ipairs(_BUFFERS) do
- if buffer._type == buffer_type then print_buffer = buffer break end
+ local buffer
+ for _, buf in ipairs(_BUFFERS) do
+ if buf._type == buffer_type then buffer = buf break end
end
- if not print_buffer then
+ if not buffer then
if not ui.tabs then view:split() end
- print_buffer = buffer.new()
- print_buffer._type = buffer_type
+ buffer = _G.buffer.new()
+ buffer._type = buffer_type
events.emit(events.FILE_OPENED)
elseif not ui.silent_print then
for _, view in ipairs(_VIEWS) do
if view.buffer._type == buffer_type then ui.goto_view(view) break end
end
- if view.buffer._type ~= buffer_type then view:goto_buffer(print_buffer) end
+ if view.buffer._type ~= buffer_type then view:goto_buffer(buffer) end
end
local args, n = {...}, select('#', ...)
for i = 1, n do args[i] = tostring(args[i]) end
- print_buffer:append_text(table.concat(args, '\t'))
- print_buffer:append_text('\n')
- print_buffer:goto_pos(buffer.length + 1)
- print_buffer:set_save_point()
+ buffer:append_text(table.concat(args, '\t'))
+ buffer:append_text('\n')
+ buffer:goto_pos(buffer.length + 1)
+ buffer:set_save_point()
end
---
-- Prints the given string messages to the buffer of string type *buffer_type*.
@@ -342,36 +342,34 @@ end)
-- Save buffer properties.
events_connect(events.BUFFER_BEFORE_SWITCH, function()
- local buffer = buffer
-- Save view state.
buffer._anchor, buffer._current_pos = buffer.anchor, buffer.current_pos
local n = buffer.main_selection
buffer._anchor_virtual_space = buffer.selection_n_anchor_virtual_space[n]
buffer._caret_virtual_space = buffer.selection_n_caret_virtual_space[n]
- buffer._top_line = buffer:doc_line_from_visible(buffer.first_visible_line)
- buffer._x_offset = buffer.x_offset
+ buffer._top_line = view:doc_line_from_visible(view.first_visible_line)
+ buffer._x_offset = view.x_offset
-- Save fold state.
- local folds, i = {}, buffer:contracted_fold_next(1)
+ local folds, i = {}, view:contracted_fold_next(1)
while i >= 1 do
- folds[#folds + 1], i = i, buffer:contracted_fold_next(i + 1)
+ folds[#folds + 1], i = i, view:contracted_fold_next(i + 1)
end
buffer._folds = folds
end)
-- Restore buffer properties.
events_connect(events.BUFFER_AFTER_SWITCH, function()
- local buffer = buffer
if not buffer._folds then return end
-- Restore fold state.
- for i = 1, #buffer._folds do buffer:toggle_fold(buffer._folds[i]) end
+ for i = 1, #buffer._folds do view:toggle_fold(buffer._folds[i]) end
-- Restore view state.
buffer:set_sel(buffer._anchor, buffer._current_pos)
buffer.selection_n_anchor_virtual_space[1] = buffer._anchor_virtual_space
buffer.selection_n_caret_virtual_space[1] = buffer._caret_virtual_space
buffer:choose_caret_x()
- local _top_line, top_line = buffer._top_line, buffer.first_visible_line
- buffer:line_scroll(0, buffer:visible_from_doc_line(_top_line) - top_line)
- buffer.x_offset = buffer._x_offset or 0
+ local _top_line, top_line = buffer._top_line, view.first_visible_line
+ view:line_scroll(0, view:visible_from_doc_line(_top_line) - top_line)
+ view.x_offset = buffer._x_offset or 0
end)
-- Updates titlebar and statusbar.
@@ -385,13 +383,12 @@ events_connect(events.VIEW_AFTER_SWITCH, update_bars)
-- Save view state.
local function save_view_state()
- local buffer = buffer
- buffer._view_eol, buffer._view_ws = buffer.view_eol, buffer.view_ws
- buffer._wrap_mode = buffer.wrap_mode
+ buffer._view_eol, buffer._view_ws = view.view_eol, view.view_ws
+ buffer._wrap_mode = view.wrap_mode
buffer._margin_type_n, buffer._margin_width_n = {}, {}
- for i = 1, buffer.margins do
- buffer._margin_type_n[i] = buffer.margin_type_n[i]
- buffer._margin_width_n[i] = buffer.margin_width_n[i]
+ for i = 1, view.margins do
+ buffer._margin_type_n[i] = view.margin_type_n[i]
+ buffer._margin_width_n[i] = view.margin_width_n[i]
end
end
events_connect(events.BUFFER_BEFORE_SWITCH, save_view_state)
@@ -399,13 +396,12 @@ events_connect(events.VIEW_BEFORE_SWITCH, save_view_state)
-- Restore view state.
local function restore_view_state()
- local buffer = buffer
if not buffer._margin_type_n then return end
- buffer.view_eol, buffer.view_ws = buffer._view_eol, buffer._view_ws
- buffer.wrap_mode = buffer._wrap_mode
- for i = 1, buffer.margins do
- buffer.margin_type_n[i] = buffer._margin_type_n[i]
- buffer.margin_width_n[i] = buffer._margin_width_n[i]
+ view.view_eol, view.view_ws = buffer._view_eol, buffer._view_ws
+ view.wrap_mode = buffer._wrap_mode
+ for i = 1, view.margins do
+ view.margin_type_n[i] = buffer._margin_type_n[i]
+ view.margin_width_n[i] = buffer._margin_width_n[i]
end
end
events_connect(events.BUFFER_AFTER_SWITCH, restore_view_state)
@@ -482,8 +478,8 @@ if CURSES then
local resize
events_connect(events.MOUSE, function(event, button, y, x)
- if event == buffer.MOUSE_RELEASE or button ~= 1 then return end
- if event == buffer.MOUSE_PRESS then
+ if event == view.MOUSE_RELEASE or button ~= 1 then return end
+ if event == view.MOUSE_PRESS then
local view = get_view(ui.get_split_table(), y - 1, x) -- title is at y = 1
if not view[1] and not view[2] then
ui.goto_view(view)