1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-01-13 02:40:28 +00:00

Running "edit foo" will now create "foo.lua" if "foo" does not exist

This commit is contained in:
Daniel Ratcliffe 2017-05-17 22:47:39 +01:00
parent 6e6b8e7eef
commit 4fb93853ce

View File

@ -13,6 +13,11 @@ if fs.exists( sPath ) and fs.isDir( sPath ) then
return
end
-- Create .lua files by default
if not fs.exists( sPath ) and not string.find( sPath, "%." ) then
sPath = sPath .. ".lua"
end
local x,y = 1,1
local w,h = term.getSize()
local scrollX, scrollY = 0,0