diff options
author | 2013-08-24 14:26:24 -0400 | |
---|---|---|
committer | 2013-08-24 14:26:24 -0400 | |
commit | 2052c77111051972d8171d27c8d4c501803e70d6 (patch) | |
tree | a38f24f35a3a4dc06f32eb365f439fc2b3918ea7 /core/file_io.lua | |
parent | 58e1d2b46d09b79ad9c43ae177057c8578294649 (diff) | |
download | textadept-2052c77111051972d8171d27c8d4c501803e70d6.tar.gz textadept-2052c77111051972d8171d27c8d4c501803e70d6.zip |
Include Scintilla constants in `buffer`s.
Diffstat (limited to 'core/file_io.lua')
-rw-r--r-- | core/file_io.lua | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/core/file_io.lua b/core/file_io.lua index 24fa4a8a..3ff52181 100644 --- a/core/file_io.lua +++ b/core/file_io.lua @@ -169,14 +169,13 @@ function io.open_file(utf8_filenames) end if not buffer.encoding then error(_L['Encoding conversion failed.']) end end - buffer.code_page = buffer.encoding and _SCINTILLA.constants.SC_CP_UTF8 or 0 + buffer.code_page = buffer.encoding and buffer.SC_CP_UTF8 or 0 -- Detect EOL mode. local s, e = text:find('\r\n?') if s and e then - buffer.eol_mode = (s == e and _SCINTILLA.constants.SC_EOL_CR or - _SCINTILLA.constants.SC_EOL_CRLF) + buffer.eol_mode = (s == e and buffer.SC_EOL_CR or buffer.SC_EOL_CRLF) else - buffer.eol_mode = _SCINTILLA.constants.SC_EOL_LF + buffer.eol_mode = buffer.SC_EOL_LF end buffer:add_text(text, #text) buffer:goto_pos(0) |