Make edit strip '\r's from line endings when opening files to avoid the '?'s. See #269.

This commit is contained in:
Florian Nücke 2014-06-09 17:38:00 +02:00
parent 9eb445b4aa
commit 70964e0e32

View File

@ -345,6 +345,9 @@ do
local w, h = getSize()
local chars = 0
for line in f:lines() do
if line:sub(-1) == "\r" then
line = line:sub(1, -2)
end
table.insert(buffer, line)
chars = chars + unicode.len(line)
if #buffer <= h then