mirror of
https://github.com/CCLeonOS/LeonOS.git
synced 2026-03-03 15:08:29 +00:00
fix(shell): 修复终端显示问题并优化界面
清除终端内容时保留顶部应用栏,并调整文本颜色为白色以提高可读性。同时修复了命令提示符的颜色显示问题。
This commit is contained in:
@@ -81,8 +81,16 @@ end
|
||||
|
||||
local history = {}
|
||||
while true do
|
||||
term.setTextColor(colors.yellow)
|
||||
-- 先清除控制台内容,但保留顶部应用栏
|
||||
local w, h = term.getSize()
|
||||
term.setTextColor(colors.white)
|
||||
term.setBackgroundColor(colors.black)
|
||||
for y=2, h do
|
||||
term.at(1, y).clearLine()
|
||||
end
|
||||
term.at(1, 2)
|
||||
|
||||
term.setTextColor(colors.yellow)
|
||||
rc.write("$ "..shell.dir().." >>> ")
|
||||
term.setTextColor(colors.white)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user