fix unicode awareness in mtmenu popups

This commit is contained in:
Izaya 2024-02-08 14:28:57 +10:00
parent 530b6599ff
commit 3b654dd6ae
1 changed files with 2 additions and 1 deletions

View File

@ -1,3 +1,4 @@
local unicode = require "unicode"
local event = require "event"
local mtmenu = {}
local mx, my
@ -61,7 +62,7 @@ end
function mtmenu.popup(str,title,state)
local mx, my = mtmenu.getScreenSize()
local len = (unicode or {}).len or string.len
local len = (unicode or {}).wlen or string.len
if title then
title=string.format("[%s]",title or "")
else