aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/plugins/autoreload.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/data/plugins/autoreload.lua b/data/plugins/autoreload.lua
index 604589de..a077b6d6 100644
--- a/data/plugins/autoreload.lua
+++ b/data/plugins/autoreload.lua
@@ -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)