mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Terminal: Ignore ctrl on chars less than '@'
Previous behaviour was to crash.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user