1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-18 01:07:40 +00:00

ui improvements - disable shell scrolling

This commit is contained in:
kepler155c@gmail.com
2018-10-24 06:50:16 -04:00
parent adc5eb286d
commit 605e923d48
3 changed files with 8 additions and 2 deletions

View File

@@ -32,6 +32,7 @@ local config = {
backgroundColor = colors.gray,
tabBarBackgroundColor = colors.gray,
focusBackgroundColor = colors.gray,
errorColor = colors.red,
},
color = {
textColor = colors.lightGray,
@@ -40,6 +41,7 @@ local config = {
backgroundColor = colors.gray,
tabBarBackgroundColor = colors.gray,
focusBackgroundColor = colors.gray,
errorColor = colors.black,
},
}
Config.load('multishell', config)
@@ -129,6 +131,7 @@ function multishell.openTab(tab)
print('\nPress enter to close')
routine.isDead = true
routine.hidden = false
redrawMenu()
while true do
local e, code = os.pullEventRaw('key')
if e == 'terminate' or e == 'key' and code == keys.enter then
@@ -252,8 +255,9 @@ kernel.hook('multishell_redraw', function()
tab.ex = tabX + tab.width
tabX = tabX + tab.width
if tab ~= currentTab then
local textColor = tab.isDead and _colors.errorColor or _colors.textColor
write(tab.sx, tab.title:sub(1, tab.width - 1),
_colors.backgroundColor, _colors.textColor)
_colors.backgroundColor, textColor)
end
end
end