Terminal: Ignore ctrl on chars less than '@'

Previous behaviour was to crash.
This commit is contained in:
mbays
2024-08-17 11:26:27 +02:00
committed by Frans de Jonge
parent cf83dc8bd3
commit 1ae38ea8bd

View File

@@ -466,7 +466,10 @@ function Terminal:generateInputDialog()
end,
strike_callback = function(chars)
if self.ctrl and #chars == 1 then
chars = string.char(chars:upper():byte() - ("A"):byte()+1)
local n = chars:upper():byte() - ("A"):byte()+1
if n >= 0 then
chars = string.char(n)
end
self.ctrl = false
end
if chars == "\n" then