From 62e94fa112489e96515c606734ce890b023d5d18 Mon Sep 17 00:00:00 2001 From: Sekai Zhou Date: Mon, 6 Dec 2021 20:16:19 +0800 Subject: [PATCH] Replace arrow char table with arithmic operation Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com> --- api.lua | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/api.lua b/api.lua index cc20717..9078e40 100644 --- a/api.lua +++ b/api.lua @@ -523,24 +523,7 @@ local function make_line_texture(line, lineno, pos, line_width, line_height, cwi if escape > 0 then escape = escape - 1 end if c == "^" and escape == 0 and c2:find("[1-8a-h]") then - c = ({ - ["1"] = string.char(0x81), - ["2"] = string.char(0x82), - ["3"] = string.char(0x83), - ["4"] = string.char(0x84), - ["5"] = string.char(0x85), - ["6"] = string.char(0x86), - ["7"] = string.char(0x87), - ["8"] = string.char(0x88), - ["a"] = string.char(0x8a), - ["b"] = string.char(0x8b), - ["c"] = string.char(0x8c), - ["d"] = string.char(0x8d), - ["e"] = string.char(0x8e), - ["f"] = string.char(0x8f), - ["g"] = string.char(0x90), - ["h"] = string.char(0x91) - })[c2] + c = string.char(tonumber(c2,18)+0x80)) i = i + 1 end