From ead90f618c46f7296afcbc5c268ce638efd58ef6 Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Wed, 25 Jun 2008 11:45:57 +0200 Subject: [PATCH] Ignore keys that have a multibyte length of more than 1. Signed-off-by: Pierre Habouzit --- lib/awful.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/awful.lua b/lib/awful.lua index a053dc2b..1390ef74 100644 --- a/lib/awful.lua +++ b/lib/awful.lua @@ -15,6 +15,7 @@ else end -- Grab environment we need +local string = string local assert = assert local loadstring = loadstring local ipairs = ipairs @@ -667,8 +668,10 @@ function P.menu(args, textbox, exe_callback, completion_callback) elseif key == "Right" then cur_pos = cur_pos + 1 else - command = command:sub(1, cur_pos - 1) .. key .. command:sub(cur_pos) - cur_pos = cur_pos + 1 + if string.len(key) == 1 then + command = command:sub(1, cur_pos - 1) .. key .. command:sub(cur_pos) + cur_pos = cur_pos + 1 + end end if cur_pos < 1 then cur_pos = 1