diff options
author | mitchell <70453897+orbitalquark@users.noreply.github.com> | 2021-04-11 09:34:17 -0400 |
---|---|---|
committer | mitchell <70453897+orbitalquark@users.noreply.github.com> | 2021-04-11 09:34:17 -0400 |
commit | de3a745e1af2e441de868c2aa4849102d376acb5 (patch) | |
tree | c2d7767600dc519b2613ddecaf7e53fb5e8867a2 /core/.view.luadoc | |
parent | 03fab17277fee7387fd93a9c2774b1ebf3f80fe4 (diff) |
Initial pass reformatting all code.
Use clang-format, LuaFormatter, and 100 character limit on lines.
Diffstat (limited to 'core/.view.luadoc')
-rw-r--r-- | core/.view.luadoc | 595 |
1 files changed, 260 insertions, 335 deletions
diff --git a/core/.view.luadoc b/core/.view.luadoc index 8fb460de..88d9e218 100644 --- a/core/.view.luadoc +++ b/core/.view.luadoc @@ -4,17 +4,15 @@ --- -- 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 of the Scintilla editing component, and additional information --- can be found on the --- [Scintilla website](https://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. --- Any view fields set on startup (e.g. in *~/.textadept/init.lua*) will be the --- default, initial values for all views. +-- 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 of the +-- Scintilla editing component, and additional information can be found on the [Scintilla +-- website](https://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. +-- Any view fields set on startup (e.g. in *~/.textadept/init.lua*) will be the default, +-- initial values for all views. -- @field additional_caret_fore (number) -- The foreground color, in "0xBBGGRR" format, of additional carets. -- @field additional_carets_blink (bool) @@ -24,8 +22,7 @@ -- 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 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. @@ -43,20 +40,17 @@ -- * `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. +-- 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`. +-- 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. +-- 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_pos_start (number, Write-only) @@ -66,31 +60,27 @@ -- 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. +-- 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. +-- 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 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. +-- 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 view is not in focus. --- The default value is `false`, showing the line only when the view is in --- focus. +-- The default value is `false`, showing the line only when the view is in focus. -- @field caret_period (number) -- The time between caret blinks in milliseconds. -- A value of `0` stops blinking. @@ -105,9 +95,8 @@ -- * `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. +-- 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) @@ -127,8 +116,8 @@ -- -- The default value is `view.CURSORNORMAL`. -- @field edge_color (number) --- The color, in "0xBBGGRR" format, of the single edge or background for long --- lines according to `view.edge_mode`. +-- 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) @@ -137,11 +126,11 @@ -- * `view.EDGE_NONE` -- Long lines are not marked. -- * `view.EDGE_LINE` --- Draw a single vertical line whose color is [`view.edge_color`]() at --- column [`view.edge_column`](). +-- Draw a single vertical line whose color is [`view.edge_color`]() at column +-- [`view.edge_column`](). -- * `view.EDGE_BACKGROUND` --- Change the background color of text after column [`view.edge_column`]() --- to [`view.edge_color`](). +-- Change the background color of text after column [`view.edge_column`]() to +-- [`view.edge_color`](). -- * `view.EDGE_MULTILINE` -- Draw vertical lines whose colors and columns are defined by calls to -- [`view:multi_edge_add_line()`](). @@ -179,10 +168,10 @@ -- -- 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. +-- 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. -- @@ -206,8 +195,8 @@ -- 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. +-- 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. @@ -215,8 +204,8 @@ -- * `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. +-- 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` @@ -225,45 +214,42 @@ -- 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. +-- 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. +-- 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. +-- 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`. +-- 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. +-- 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`. +-- 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. +-- 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`. +-- 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`. @@ -283,10 +269,9 @@ -- * `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`. +-- 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` @@ -297,22 +282,20 @@ -- 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. +-- 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. +-- 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. +-- 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. +-- 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. +-- 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` @@ -321,21 +304,20 @@ -- A triangle below the center 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. +-- A box with a vertical gradient from solid on top to transparent on bottom. -- * `view.INDIC_GRADIENTCENTER` --- A box with a centered gradient from solid in the middle to transparent on --- the top and bottom. +-- 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`. +-- 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. +-- 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. @@ -343,12 +325,11 @@ -- 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). +-- 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_COLOR`. -- @field margin_cursor_n (table) --- Table of cursor types shown over margin numbers from `1` to --- `view.margins` (`5` by default). +-- Table of cursor types shown over margin numbers from `1` to `view.margins` (`5` by default). -- -- * `view.CURSORARROW` -- Normal arrow cursor. @@ -360,44 +341,39 @@ -- 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. +-- 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. +-- 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). +-- 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). +-- 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. +-- 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. +-- A marker symbol margin whose background color matches the default text foreground color. -- * `view.MARGIN_TEXT` -- A text margin. -- * `view.MARGIN_RTEXT` @@ -405,32 +381,27 @@ -- * `view.MARGIN_COLOR` -- 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. +-- 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). +-- 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`. +-- 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`. +-- 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`. +-- 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`. +-- 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. +-- 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. +-- 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 multi_edge_column (table, Read-only) -- Table of edge column positions per edge column number. @@ -438,14 +409,13 @@ -- @field property (table) -- Map of key-value string pairs used by lexers. -- @field property_expanded (table, Read-only) --- Map of key-value string pairs used by lexers with `$()` and `%()` variable --- replacement performed in values. +-- Map of key-value string pairs used by lexers with `$()` and `%()` variable replacement +-- performed in values. -- @field property_int (table, Read-only) --- Map of key-value pairs used by lexers with values interpreted as numbers, --- or `0` if not found. +-- Map of key-value pairs used by lexers with values interpreted as numbers, or `0` if not found. -- @field rectangular_selection_modifier (number) --- The modifier key used in combination with a mouse drag in order to create a --- rectangular selection. +-- The modifier key used in combination with a mouse drag in order to create a rectangular +-- selection. -- -- * `view.MOD_CTRL` -- The "Control" modifier key. @@ -458,39 +428,34 @@ -- 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. --- Characters are strings, not numeric codes, and can be multi-byte --- characters. +-- Representations are displayed in the same way control characters are. Use the empty +-- string for the '\0' character when assigning its representation. Characters are strings, +-- not numeric codes, and can be multi-byte characters. -- 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()`](). +-- 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 macOS 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. +-- This is useful on macOS 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 +-- 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`](). +-- 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`](). +-- 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 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. @@ -498,11 +463,9 @@ -- @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`. +-- 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`. +-- 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`. @@ -518,33 +481,32 @@ -- -- 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`. +-- 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`. +-- 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`. +-- 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`. +-- 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`. +-- 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`. +-- 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. @@ -575,8 +537,7 @@ -- -- 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 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. @@ -634,8 +595,8 @@ -- 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. +-- 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, down to `-10`. @@ -949,37 +910,34 @@ module('view') local buffer --- --- Highlights the character at position *pos* as an unmatched brace character --- using the `'style.bracebad'` style. +-- 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 *view*'s buffer to highlight, or `-1` to remove --- the highlight. +-- @param pos The position in *view*'s 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`. +-- 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. +-- 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 *view*'s buffer to highlight. -- @param pos2 The second position in *view*'s 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`. +-- 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. @@ -1003,52 +961,49 @@ function call_tip_cancel(view) end function call_tip_pos_start(view) end --- --- Highlights a call tip's text between positions *start_pos* to *end_pos* with --- the color `view.call_tip_fore_hlt`. +-- 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 --- --- 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 --- arrow visuals, respectively. These may be used to indicate that a symbol has --- more than one call tip, for example. +-- 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 arrow visuals, +-- respectively. These may be used to indicate that a symbol has more than one call tip, +-- for example. -- @param view A view. -- @param pos The position in *view*'s buffer to show a call tip at. -- @param text The call tip text to show. function call_tip_show(view, pos, text) end --- --- Clears all images registered using `view.register_image()` and --- `view.register_rgba_image()`. +-- 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* (which may --- be a multi-byte character). +-- Removes the alternate string representation for character *char* (which may be a multi-byte +-- character). -- @param view A view. --- @param char The string character in `buffer.representations` to remove the --- alternate string representation for. +-- @param char The string 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. +-- 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 *view* to start at. -- @return number function contracted_fold_next(view, line) end --- --- Returns the actual line number of displayed line number *display_line*, --- taking wrapped, annotated, and 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`. +-- Returns the actual line number of displayed line number *display_line*, taking wrapped, +-- annotated, and 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 @@ -1061,17 +1016,15 @@ function doc_line_from_visible(view, display_line) end 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()`. +-- 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 *view* 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. +-- 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` @@ -1080,8 +1033,8 @@ function ensure_visible_enforce_policy(view, line) end 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*. +-- 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 *view* to set the fold states for. -- @param action The fold action to perform. Valid values are: @@ -1091,8 +1044,7 @@ function fold_all(view, action) end function fold_children(view, line, action) end --- --- Contracts, expands, or toggles the fold point on line number *line*, --- depending on *action*. +-- Contracts, expands, or toggles the fold point on line number *line*, depending on *action*. -- @param view A view. -- @param line The line number in *view* to set the fold state for. -- @param action The fold action to perform. Valid values are: @@ -1108,8 +1060,7 @@ 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. +-- 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 *view* to hide. -- @param end_line The end line of the range of lines in *view* to hide. @@ -1134,70 +1085,57 @@ function line_scroll_down(view) end 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*. +-- 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 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*. +-- 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 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*. +-- 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 color bytes are not premultiplied --- by the alpha value. That is, a fully red pixel that is 25% opaque will be +-- @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 color 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`. +-- 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()`, +-- 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. +-- @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. +-- 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. @@ -1209,24 +1147,20 @@ function multi_edge_add_line(view, column, color) end function multi_edge_clear_all(view) end --- --- Registers XPM image *xpm_data* to type number *type* for use in --- autocompletion and user lists. +-- 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. +-- 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()`. +-- @param pixels The RGBA data as described in `view.marker_define_rgba_image()`. function register_rgba_image(view, type, pixels) end --- @@ -1248,10 +1182,9 @@ function scroll_to_end(view) end 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`. +-- 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. @@ -1266,25 +1199,24 @@ function scroll_range(view, secondary_pos, primary_pos) end 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`. +-- 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_color(view, use_setting, color) end --- --- Overrides the fold margin's default highlight color with color *color*, in --- "0xBBGGRR" format, if *use_setting* is `true`. +-- 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_color(view, use_setting, color) end --- --- Overrides the selection's default background color with color *color*, in --- "0xBBGGRR" format, if *use_setting* is `true`. +-- 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*. @@ -1292,8 +1224,8 @@ function set_fold_margin_hi_color(view, use_setting, color) end 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`. +-- 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*. @@ -1301,53 +1233,52 @@ function set_sel_back(view, use_setting, color) end 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. +-- 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 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`. +-- 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`. +-- 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. +-- 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 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. +-- 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 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. +-- 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 *view* to show. -- @param end_line The end line of the range of lines in *view* to show. @@ -1371,8 +1302,8 @@ function style_reset_default(view) end 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`. +-- 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. @@ -1380,22 +1311,20 @@ function text_height(view, line) end 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). +-- 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 *view* 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* next to that line. +-- 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* +-- next to that line. -- *text* is drawn with style number `view.STYLE_FOLDDISPLAYTEXT`. -- @param view A view. --- @param line The line number in *view* to toggle the fold on and display --- *text* after. +-- @param line The line number in *view* 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 @@ -1405,9 +1334,8 @@ function toggle_fold_show_text(view, line, text) end function vertical_center_caret(view) end --- --- Returns the displayed line number of actual line number *line*, taking --- wrapped, annotated, and hidden lines into account, or `-1` if *line* is --- outside the range of lines in the buffer. +-- Returns the displayed line number of actual line number *line*, taking wrapped, annotated, +-- and 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 *view* to use. @@ -1415,8 +1343,7 @@ function vertical_center_caret(view) end function visible_from_doc_line(view, line) end --- --- Returns the number of wrapped lines needed to fully display line number --- *line*. +-- Returns the number of wrapped lines needed to fully display line number *line*. -- @param view A view. -- @param line The line number in *view* to use. -- @return number @@ -1435,14 +1362,13 @@ 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 --- right views. +-- 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 right views. -- Emits a `VIEW_NEW` event. -- @param view The view to split. --- @param vertical Optional flag indicating whether or not to split the view --- vertically. The default value is `false`, for horizontal. +-- @param vertical Optional flag indicating whether or not to split the view vertically. The +-- default value is `false`, for horizontal. -- @return old view and new view. -- @see events.VIEW_NEW function split(view, vertical) end @@ -1454,8 +1380,8 @@ function split(view, vertical) end function unsplit(view) end --- --- Switches to buffer *buffer* or the buffer *buffer* number of buffers relative --- to the current one. +-- Switches to buffer *buffer* or the buffer *buffer* number of buffers relative to the +-- current one. -- Emits `BUFFER_BEFORE_SWITCH` and `BUFFER_AFTER_SWITCH` events. -- @param view The view to switch buffers in. -- @param buffer A buffer or relative buffer number (typically 1 or -1). @@ -1465,15 +1391,14 @@ function unsplit(view) end function goto_buffer(view, buffer) end --- --- Sets the view's color theme to be string *name*, with the contents of table --- *env* available as global variables. --- User themes override Textadept's default themes when they have the same name. --- If *name* contains slashes, it is assumed to be an absolute path to a theme --- instead of a theme name. +-- Sets the view's color theme to be string *name*, with the contents of table *env* available +-- as global variables. +-- User themes override Textadept's default themes when they have the same name. If *name* +-- contains slashes, it is assumed to be an absolute path to a theme instead of a theme name. -- @param view A view. -- @param name The name or absolute path of a theme to set. --- @param env Optional table of global variables themes can utilize to override --- default settings such as font and size. +-- @param env Optional table of global variables themes can utilize to override default settings +-- such as font and size. -- @usage view:set_theme('light', {font = 'Monospace', size = 12}) -- @name set_theme -- @see _G.lexer.colors |