From f2374c4aba53fa462dc88d4104e10d8cb97e61ba Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Mon, 25 May 2020 21:16:01 -0400 Subject: 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. --- scripts/gen_iface.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'scripts') 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 -- cgit v1.2.3