Changed autoreload to strip carriage-returns on reload

This commit is contained in:
rxi
2020-05-21 09:58:47 +01:00
parent 7aabfebfa0
commit 6b39fb6dfb
+1 -1
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)