aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2020-05-25 21:16:01 -0400
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2020-05-25 21:16:01 -0400
commitf2374c4aba53fa462dc88d4104e10d8cb97e61ba (patch)
tree5e5a9d26a5ad8915c0e12187dd059b1109fcf22d /scripts
parenteffc636745e8d9c680c3acf42e8e25eed10cd903 (diff)
Allow views to be used as buffers and update API.
This allows for a superficial separation of buffer- and view-specific Scintilla functionality. buffers and views can now be used interchangeably for the most part, and the APIs are guidance, not hard requirements. User scripts do not require any modification and will continue to function normally.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/gen_iface.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/gen_iface.lua b/scripts/gen_iface.lua
index dcd4b9b5..7d03cd5a 100755
--- a/scripts/gen_iface.lua
+++ b/scripts/gen_iface.lua
@@ -244,11 +244,11 @@ f:write([[
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')
@@ -261,7 +261,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')
@@ -284,12 +284,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