aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/file_io.lua4
-rw-r--r--core/init.lua2
-rw-r--r--modules/textadept/editing.lua2
-rw-r--r--modules/textadept/find.lua2
-rw-r--r--modules/textadept/snippets.lua6
5 files changed, 8 insertions, 8 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
diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua
index 26f53449..9235aa70 100644
--- a/modules/textadept/editing.lua
+++ b/modules/textadept/editing.lua
@@ -601,7 +601,7 @@ function M.filter_through(command)
local p = assert(spawn(commands[i]))
p:write(output)
p:close()
- output = p:read('*a') or ''
+ output = p:read('a') or ''
end
buffer:replace_target(output:iconv('UTF-8', _CHARSET))
if s ~= e then
diff --git a/modules/textadept/find.lua b/modules/textadept/find.lua
index 7a0a0d0c..4f6ce774 100644
--- a/modules/textadept/find.lua
+++ b/modules/textadept/find.lua
@@ -254,7 +254,7 @@ function M.find_in_files(dir, filter)
buffer:empty_undo_buffer()
local f = io.open(filename, 'rb')
while f:read(0) do buffer:append_text(f:read(1048576)) end
- --buffer:set_text(f:read('*a'))
+ --buffer:set_text(f:read('a'))
f:close()
local binary = nil -- determine lazily for performance reasons
buffer:target_whole_document()
diff --git a/modules/textadept/snippets.lua b/modules/textadept/snippets.lua
index 698afa38..f7239ef3 100644
--- a/modules/textadept/snippets.lua
+++ b/modules/textadept/snippets.lua
@@ -339,7 +339,7 @@ function M._insert(text)
if first == lexer and second == trigger or
first == trigger and second == '' and not text then
local f = io.open(M._paths[i]..'/'..basename)
- text = f:read('*a')
+ text = f:read('a')
f:close()
end
end
@@ -393,7 +393,7 @@ function M._select()
local first, second = basename:match('^([^.]+)%.?([^.]*)')
if second == '' or first == lexer then
local f = io.open(M._paths[i]..'/'..basename)
- list[#list + 1] = (second ~= '' and second or first)..'|'..f:read('*a')
+ list[#list + 1] = (second ~= '' and second or first)..'|'..f:read('a')
f:close()
end
end
@@ -575,7 +575,7 @@ M._snippet_mt = {
-- Note: cannot use spawn since $env variables are not expanded.
local command = placeholder.sh_code:gsub('%f[%%]%%%f[^%%]', text)
local p = io.popen(command)
- local result = p:read('*a'):sub(1, -2) -- chop '\n'
+ local result = p:read('a'):sub(1, -2) -- chop '\n'
p:close()
return result
end