diff options
author | 2014-01-01 12:28:33 -0500 | |
---|---|---|
committer | 2014-01-01 12:28:33 -0500 | |
commit | ee8e402829b65901351bbbf7417c291da7c3b541 (patch) | |
tree | a87d3008adae84a0e2a0a8ee07b1464aa4a29557 /core | |
parent | 66bfdfeda14c40f631fe808c0b2d50ee2f14a254 (diff) | |
download | textadept-ee8e402829b65901351bbbf7417c291da7c3b541.tar.gz textadept-ee8e402829b65901351bbbf7417c291da7c3b541.zip |
Merge the separate Textadept and lexer Lua states into a single unified one.
This is an experimental change and requires the latest Scintillua changes.
Diffstat (limited to 'core')
-rw-r--r-- | core/ui.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/ui.lua b/core/ui.lua index a4ceeac2..09d273c0 100644 --- a/core/ui.lua +++ b/core/ui.lua @@ -249,6 +249,7 @@ events_connect(events.VIEW_NEW, function() events.emit(events.UPDATE_UI) end) local SETDIRECTFUNCTION = _SCINTILLA.properties.direct_function[1] local SETDIRECTPOINTER = _SCINTILLA.properties.doc_pointer[2] +local SETLUASTATE = _SCINTILLA.functions.change_lexer_state[1] local SETLEXERLANGUAGE = _SCINTILLA.properties.lexer_language[2] -- Sets default properties for a Scintilla document. events_connect(events.BUFFER_NEW, function() @@ -257,6 +258,7 @@ events_connect(events.BUFFER_NEW, function() buffer.lexer_language = 'lpeg' buffer:private_lexer_call(SETDIRECTFUNCTION, buffer.direct_function) buffer:private_lexer_call(SETDIRECTPOINTER, buffer.direct_pointer) + buffer:private_lexer_call(SETLUASTATE, _LUA) buffer.property['lexer.lpeg.home'] = _USERHOME..'/lexers/?.lua;'.. _HOME..'/lexers' load_theme_and_settings() @@ -441,7 +443,7 @@ local goto_view -- Low-level function for creating a menu from table *menu_table* and returning -- the userdata. -- You probably want to use the higher-level `textadept.menu.set_menubar()` --- or `textadept.menu.set_contextmenus()` functions. Emits a `MENU_CLICKED` +-- or `textadept.menu.set_contextmenus()` functions. Emits a `MENU_CLICKED` -- event when a menu item is selected. -- @param menu_table A table defining the menu. It is an ordered list of tables -- with a string menu item, integer menu ID, and optional GDK keycode and |