diff --git a/src/main/resources/assets/opencomputers/loot/OpenOS/boot/02_io.lua b/src/main/resources/assets/opencomputers/loot/OpenOS/boot/02_io.lua index edcf4dce2..45c2ed946 100644 --- a/src/main/resources/assets/opencomputers/loot/OpenOS/boot/02_io.lua +++ b/src/main/resources/assets/opencomputers/loot/OpenOS/boot/02_io.lua @@ -21,8 +21,8 @@ end stdoutStream.close = stdinStream.close stderrStream.close = stdinStream.close -function stdinStream:read(n) - local result = term.read(stdinHistory) +function stdinStream:read(n, dowrap) + local result = term.read(stdinHistory, dowrap) while #stdinHistory > 10 do table.remove(stdinHistory, 1) end @@ -61,4 +61,4 @@ io.stdout:setvbuf("no") io.stderr:setvbuf("no") io.input(io.stdin) -io.output(io.stdout) \ No newline at end of file +io.output(io.stdout) diff --git a/src/main/resources/assets/opencomputers/loot/OpenOS/lib/term.lua b/src/main/resources/assets/opencomputers/loot/OpenOS/lib/term.lua index a6d239277..fa60b795b 100644 --- a/src/main/resources/assets/opencomputers/loot/OpenOS/lib/term.lua +++ b/src/main/resources/assets/opencomputers/loot/OpenOS/lib/term.lua @@ -80,7 +80,7 @@ function term.isAvailable() return component.isAvailable("gpu") and component.isAvailable("screen") end -function term.read(history) +function term.read(history, dobreak) checkArg(1, history, "table", "nil") history = history or {} table.insert(history, "") @@ -286,7 +286,7 @@ function term.read(history) table.remove(history) end term.setCursorBlink(false) - if term.getCursor() > 1 then + if term.getCursor() > 1 and dobreak ~= false then print() end end