Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Eldit text elditor
- local tArg = {...}
- local filename, lineNo, doAutosave, doAutoDisplay = tArg[1], tArg[2] or 1, false, false
- if tArg[3] == "-s" or tArg[4] == "-s" then
- doAutosave = true
- end
- if tArg[3] == "-u" or tArg[4] == "-u" then
- doAutoDisplay = true
- end
- local displayHelp = function()
- print("eldit <file> [line] [-u] [-s]")
- print("-u - immediately display changes")
- print("-s - autosave")
- end
- if not filename then
- return displayHelp()
- end
- local scroll = 1
- local render = function(text,scrollx,scrolly)
- term.setCursorPos(1,scrolly)
- term.write(text)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement