aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/macros.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2009-02-14 16:31:42 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2009-02-14 16:31:42 -0500
commit754687fd75a226cb5a3a46d92b8c48e589a59a54 (patch)
tree9e2f716a1f90533205d3dacd54606d4a648a01f5 /modules/textadept/macros.lua
parent6fc95cc3a1df42d81f24d1a912bcaec952db62d4 (diff)
downloadtextadept-754687fd75a226cb5a3a46d92b8c48e589a59a54.tar.gz
textadept-754687fd75a226cb5a3a46d92b8c48e589a59a54.zip
Read and write in binary mode for everything.
Diffstat (limited to 'modules/textadept/macros.lua')
-rw-r--r--modules/textadept/macros.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/textadept/macros.lua b/modules/textadept/macros.lua
index 80a89d0f..f45e1fa2 100644
--- a/modules/textadept/macros.lua
+++ b/modules/textadept/macros.lua
@@ -147,7 +147,7 @@ end
-- @param filename The absolute path to the file to save the macros to.
function save(filename)
if not filename then filename = MACRO_FILE end
- local f = assert(io.open(filename, 'w'))
+ local f = assert(io.open(filename, 'wb'))
for name, macro in pairs(list) do
f:write(name, '\n')
for _, command in ipairs(macro) do
@@ -170,7 +170,7 @@ end
-- @param filename The absolute path to the file to load the macros from.
function load(filename)
if not filename then filename = MACRO_FILE end
- local f = io.open(filename)
+ local f = io.open(filename, 'rb')
if not f then return end
local name, current_macro
for line in f:lines() do