fix unicode awareness in mtmenu popups
This commit is contained in:
parent
530b6599ff
commit
3b654dd6ae
@ -1,3 +1,4 @@
|
|||||||
|
local unicode = require "unicode"
|
||||||
local event = require "event"
|
local event = require "event"
|
||||||
local mtmenu = {}
|
local mtmenu = {}
|
||||||
local mx, my
|
local mx, my
|
||||||
@ -61,7 +62,7 @@ end
|
|||||||
|
|
||||||
function mtmenu.popup(str,title,state)
|
function mtmenu.popup(str,title,state)
|
||||||
local mx, my = mtmenu.getScreenSize()
|
local mx, my = mtmenu.getScreenSize()
|
||||||
local len = (unicode or {}).len or string.len
|
local len = (unicode or {}).wlen or string.len
|
||||||
if title then
|
if title then
|
||||||
title=string.format("[%s]",title or "")
|
title=string.format("[%s]",title or "")
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user