Changed autoreload to strip carriage-returns on reload

This commit is contained in:
rxi 2020-05-21 09:57:26 +01:00
parent 7aabfebfa0
commit 6b39fb6dfb

View file

@ -18,7 +18,7 @@ local function reload_doc(doc)
local sel = { doc:get_selection() }
doc:remove(1, 1, math.huge, math.huge)
doc:insert(1, 1, text:gsub("\n$", ""))
doc:insert(1, 1, text:gsub("\r", ""):gsub("\n$", ""))
doc:set_selection(table.unpack(sel))
update_time(doc)