aboutsummaryrefslogtreecommitdiffhomepage
path: root/core
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2013-12-14 14:09:46 -0500
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2013-12-14 14:09:46 -0500
commit60add5e81455a848b238277d7e96d2551d588aaa (patch)
tree35009800b98bf40b40845825c6c4acd72de2f831 /core
parent78c037ab970c2f38272ddd1cf3dbf7b89be86039 (diff)
Do not stop opening files if one of them is already open; core/file_io.lua
Diffstat (limited to 'core')
-rw-r--r--core/file_io.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/file_io.lua b/core/file_io.lua
index 24a94c41..ae34a735 100644
--- a/core/file_io.lua
+++ b/core/file_io.lua
@@ -117,7 +117,7 @@ function io.open_file(filenames)
local filename = filenames[i]:gsub('^file://', '')
if WIN32 then filename = filename:gsub('/', '\\') end
for i, buffer in ipairs(_BUFFERS) do
- if filename == buffer.filename then view:goto_buffer(i) return end
+ if filename == buffer.filename then view:goto_buffer(i) goto continue end
end
local text = ''
@@ -167,6 +167,7 @@ function io.open_file(filenames)
if file == filename then table.remove(io.recent_files, i) break end
end
table.insert(io.recent_files, 1, filename)
+ ::continue::
end
end
@@ -428,7 +429,7 @@ if WIN32 then
read = function(self, format)
if not format or not format:find('^%*a') then return f:read() end
local chunk, text = f:read(), {}
- while chunk do
+ while chunk do
text[#text + 1] = chunk
chunk = f:read()
end