aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2011-08-25 18:59:19 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2011-08-25 18:59:19 -0400
commita7cf016d3e7db80e510e0bef293d88121d1e5b1b (patch)
tree7a0eadc2a2feda8c1a67dfa0541bab4a0b4d8ff1 /core
parent08458482a6ef165e11db6d6ddc91365f139d85ca (diff)
downloadtextadept-a7cf016d3e7db80e510e0bef293d88121d1e5b1b.tar.gz
textadept-a7cf016d3e7db80e510e0bef293d88121d1e5b1b.zip
Set buffer.eol_mode properly for new buffers on Mac OSX; core/gui.lua
Diffstat (limited to 'core')
-rw-r--r--core/gui.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/gui.lua b/core/gui.lua
index e0a739b4..f70a8f4a 100644
--- a/core/gui.lua
+++ b/core/gui.lua
@@ -120,6 +120,7 @@ local SETLEXERLANGUAGE = _SCINTILLA.functions.set_lexer_language[1]
connect(events.BUFFER_NEW, function()
local function run()
local buffer = buffer
+ local c = _SCINTILLA.constants
-- Lexer.
buffer:set_lexer_language('lpeg')
@@ -137,7 +138,8 @@ connect(events.BUFFER_NEW, function()
end
-- Buffer.
- buffer.code_page = _SCINTILLA.constants.SC_CP_UTF8
+ buffer.code_page = c.SC_CP_UTF8
+ buffer.eol_mode = not WIN32 and c.SC_EOL_LF or c.SC_EOL_CRLF
if _THEME and #_THEME > 0 then
local ok, err = pcall(dofile, _THEME..'/buffer.lua')