Teminal emulator: fix translatable, fix potential crash (#8756)

pull/8758/head
zwim 2 years ago committed by GitHub
parent f0197423ad
commit 8cff5f88b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -443,7 +443,7 @@ Aliases (shortcuts) to frequently used commands can be placed in:
},
{
text_func = function()
local state = self.is_shell_open and "running" or "not running"
local state = self.is_shell_open and _("running") or _("not running")
return T(_("Open terminal session (%1)"), state)
end,
callback = function(touchmenu_instance)

@ -252,7 +252,7 @@ function TermInputText:_helperVT52VT100(cmd, mode, param1, param2, param3)
self.scroll_region_bottom = nil
end
if self.scroll_region_bottom and param1 < self.maxr and param1 <= param2 then
if self.scroll_region_bottom and param1 < self.maxr and param1 <= param2 and param1 > 0 then
self.scroll_region_top = param1
self.scroll_region_line = 1
else

Loading…
Cancel
Save