From a61c388d38cf507fd0e5e8de5baae97ed45f4d59 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Wed, 19 Oct 2016 17:01:10 -0400 Subject: Updated to Scintilla 3.7.0. --- core/init.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'core/init.lua') diff --git a/core/init.lua b/core/init.lua index 8fff0c15..114d2f18 100644 --- a/core/init.lua +++ b/core/init.lua @@ -47,6 +47,16 @@ local function text_range(buffer, start_pos, end_pos) end events.connect(events.BUFFER_NEW, function() buffer.text_range = text_range end) +local _brace_match +-- Compatibility function for Scintilla's current `buffer:brace_match()`, which +-- has an extra, required `0` parameter (introduced in 3.7.0). +-- Documentation is in core/.buffer.luadoc. +local function brace_match(buffer, pos) return _brace_match(buffer, pos, 0) end +events.connect(events.BUFFER_NEW, function() + if not _brace_match then _brace_match = buffer.brace_match end + buffer.brace_match = brace_match +end) + --[[ This comment is for LuaDoc. --- -- Extends Lua's _G table to provide extra functions and fields for Textadept. -- cgit v1.2.3