Changed autoreload to strip carriage-returns on reload
This commit is contained in:
parent
7aabfebfa0
commit
6b39fb6dfb
|
@ -18,7 +18,7 @@ local function reload_doc(doc)
|
||||||
|
|
||||||
local sel = { doc:get_selection() }
|
local sel = { doc:get_selection() }
|
||||||
doc:remove(1, 1, math.huge, math.huge)
|
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))
|
doc:set_selection(table.unpack(sel))
|
||||||
|
|
||||||
update_time(doc)
|
update_time(doc)
|
||||||
|
|
Loading…
Reference in New Issue