awful: fix a bug with backspace in menu
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
4617f0ba34
commit
9aa52f7b0f
|
@ -501,8 +501,10 @@ local function menu(args, textbox, exe_callback)
|
|||
else
|
||||
-- Typin cases
|
||||
if key == "BackSpace" then
|
||||
if cur_pos > 1 then
|
||||
command = command:sub(1, cur_pos - 2) .. command:sub(cur_pos)
|
||||
cur_pos = cur_pos - 1
|
||||
end
|
||||
-- That's DEL
|
||||
elseif key:byte() == 127 then
|
||||
command = command:sub(1, cur_pos - 1) .. command:sub(cur_pos + 1)
|
||||
|
|
Loading…
Reference in New Issue