aboutsummaryrefslogtreecommitdiff
path: root/core/gui.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2013-08-24 14:26:24 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2013-08-24 14:26:24 -0400
commit2052c77111051972d8171d27c8d4c501803e70d6 (patch)
treea38f24f35a3a4dc06f32eb365f439fc2b3918ea7 /core/gui.lua
parent58e1d2b46d09b79ad9c43ae177057c8578294649 (diff)
downloadtextadept-2052c77111051972d8171d27c8d4c501803e70d6.tar.gz
textadept-2052c77111051972d8171d27c8d4c501803e70d6.zip
Include Scintilla constants in `buffer`s.
Diffstat (limited to 'core/gui.lua')
-rw-r--r--core/gui.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/gui.lua b/core/gui.lua
index 9d17cae4..22282a68 100644
--- a/core/gui.lua
+++ b/core/gui.lua
@@ -214,17 +214,17 @@ end
-- Sets default properties for a Scintilla window.
events_connect(events.VIEW_NEW, function()
local buffer = buffer
- local c = _SCINTILLA.constants
-- Allow redefinitions of these Scintilla key commands.
local ctrl_keys = {
'[', ']', '/', '\\', 'Z', 'Y', 'X', 'C', 'V', 'A', 'L', 'T', 'D', 'U'
}
local ctrl_shift_keys = {'L', 'T', 'U', 'Z'}
for _, key in ipairs(ctrl_keys) do
- buffer:clear_cmd_key(string.byte(key), c.SCMOD_CTRL)
+ buffer:clear_cmd_key(string.byte(key), buffer.SCMOD_CTRL)
end
for _, key in ipairs(ctrl_shift_keys) do
- buffer:clear_cmd_key(string.byte(key), c.SCMOD_CTRL + c.SCMOD_SHIFT)
+ buffer:clear_cmd_key(string.byte(key),
+ buffer.SCMOD_CTRL + buffer.SCMOD_SHIFT)
end
-- Since BUFFER_NEW loads themes and settings on startup, only load them for
-- subsequent views.
@@ -237,7 +237,7 @@ local SETDIRECTPOINTER = _SCINTILLA.properties.doc_pointer[2]
local SETLEXERLANGUAGE = _SCINTILLA.properties.lexer_language[2]
-- Sets default properties for a Scintilla document.
events_connect(events.BUFFER_NEW, function()
- buffer.code_page = _SCINTILLA.constants.SC_CP_UTF8
+ buffer.code_page = buffer.SC_CP_UTF8
buffer.style_bits = 8
buffer.lexer_language = 'lpeg'
buffer:private_lexer_call(SETDIRECTFUNCTION, buffer.direct_function)