diff options
author | 2010-08-31 18:28:48 -0400 | |
---|---|---|
committer | 2010-08-31 18:28:48 -0400 | |
commit | f062973a81b74e5a5ea38602d74a8ee61aa76695 (patch) | |
tree | 90a15e45d4d3196d6a10dbad1c3872e39df895e0 /core/events.lua | |
parent | d4db80a3d354ba3c39038c8fb4a1477516fec6d8 (diff) | |
download | textadept-f062973a81b74e5a5ea38602d74a8ee61aa76695.tar.gz textadept-f062973a81b74e5a5ea38602d74a8ee61aa76695.zip |
Change Lua interface to support updated LPeg Scintilla lexer.
Diffstat (limited to 'core/events.lua')
-rw-r--r-- | core/events.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/events.lua b/core/events.lua index b0f488f2..9650dd4c 100644 --- a/core/events.lua +++ b/core/events.lua @@ -248,13 +248,19 @@ connect('view_new', end end) +local SETDIRECTFUNCTION = _SCINTILLA.properties.direct_function[1] +local SETDIRECTPOINTER = _SCINTILLA.properties.doc_pointer[2] +local SETLEXERLANGUAGE = _SCINTILLA.functions.set_lexer_language[1] connect('buffer_new', function() -- sets default properties for a Scintilla document local function run() local buffer = buffer -- lexer - buffer:set_lexer_language('container') + buffer:set_lexer_language('llpeg') + buffer:private_lexer_call(SETDIRECTFUNCTION, buffer.direct_function) + buffer:private_lexer_call(SETDIRECTPOINTER, buffer.direct_pointer) + buffer:private_lexer_call(SETLEXERLANGUAGE, 'container') buffer.style_bits = 8 -- properties |