Terminal: Ignore ctrl on chars less than '@'

Previous behaviour was to crash.
reviewable/pr12446/r1
mbays 1 month ago committed by Frans de Jonge
parent cf83dc8bd3
commit 1ae38ea8bd

@ -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

Loading…
Cancel
Save