aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2018-07-28 10:34:38 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2018-07-28 10:34:38 -0400
commit429a7642d6beadc4ce37b902e31fa561f8382edb (patch)
tree5eb55ba2c581403e4144efc57fd764c487e6e113 /core
parent9ed6ce47681f06ef0b7f4afa8c081dab6d174eb9 (diff)
downloadtextadept-429a7642d6beadc4ce37b902e31fa561f8382edb.tar.gz
textadept-429a7642d6beadc4ce37b902e31fa561f8382edb.zip
Removed optional '*' prefix in I/O reads.
Lua 5.3 made them optional and LuaJIT support has been dropped.
Diffstat (limited to 'core')
-rw-r--r--core/file_io.lua4
-rw-r--r--core/init.lua2
2 files changed, 3 insertions, 3 deletions
diff --git a/core/file_io.lua b/core/file_io.lua
index e5766c30..c7fc3472 100644
--- a/core/file_io.lua
+++ b/core/file_io.lua
@@ -116,7 +116,7 @@ function io.open_file(filenames, encodings)
local text = ''
local f, err = io.open(filename, 'rb')
if f then
- text = f:read('*a')
+ text = f:read('a')
f:close()
if not text then goto continue end -- filename exists, but cannot read it
elseif lfs.attributes(filename) then
@@ -172,7 +172,7 @@ function io.reload_file()
if not buffer.filename then return end
local pos, first_visible_line = buffer.current_pos, buffer.first_visible_line
local f = assert(io.open(buffer.filename, 'rb'))
- local text = f:read('*a')
+ local text = f:read('a')
f:close()
if buffer.encoding then text = text:iconv('UTF-8', buffer.encoding) end
buffer:clear_all()
diff --git a/core/init.lua b/core/init.lua
index 706e644d..360c3ef4 100644
--- a/core/init.lua
+++ b/core/init.lua
@@ -24,7 +24,7 @@ if CURSES and WIN32 then
local p = io.popen(argv..' 2>&1')
local cb_index = type(select(1, ...)) ~= 'table' and 1 or 2 -- ignore env
local stdout_cb, exit_cb = select(cb_index, ...), select(cb_index + 2, ...)
- if stdout_cb then stdout_cb(p:read('*a')) end
+ if stdout_cb then stdout_cb(p:read('a')) end
if exit_cb then exit_cb(select(3, p:close())) else p:close() end
lfs.chdir(current_dir)
return p