diff --git a/sys/apis/ui.lua b/sys/apis/ui.lua index 9ef1efd..c922973 100644 --- a/sys/apis/ui.lua +++ b/sys/apis/ui.lua @@ -3261,6 +3261,8 @@ function UI.Form:save() if (child.pruneEmpty and type(child.value) == 'string' and #child.value == 0) or (child.pruneEmpty and type(child.value) == 'boolean' and not child.value) then self.values[child.formKey] = nil + elseif child.validate == 'numeric' then + self.values[child.formKey] = tonumber(child.value) else self.values[child.formKey] = child.value end diff --git a/sys/apps/shell b/sys/apps/shell index 124d9fc..6aaaed7 100644 --- a/sys/apps/shell +++ b/sys/apps/shell @@ -365,7 +365,7 @@ local term = _G.term local textutils = _G.textutils local terminal = term.current() -Terminal.scrollable(terminal, 100) +--Terminal.scrollable(terminal, 100) terminal.noAutoScroll = true local config = { diff --git a/sys/extensions/7.multishell.lua b/sys/extensions/7.multishell.lua index 0a4a81d..b3c2a99 100644 --- a/sys/extensions/7.multishell.lua +++ b/sys/extensions/7.multishell.lua @@ -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