awful.prompt: fix delete

Signed-off-by: koniu <gkusnierz@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
koniu 2009-05-07 21:03:04 +01:00 committed by Julien Danjou
parent 5344818677
commit 3849e6d747
1 changed files with 1 additions and 2 deletions

View File

@ -278,8 +278,7 @@ function run(args, textbox, exe_callback, completion_callback, history_path, his
command = command:sub(1, cur_pos - 2) .. command:sub(cur_pos) command = command:sub(1, cur_pos - 2) .. command:sub(cur_pos)
cur_pos = cur_pos - 1 cur_pos = cur_pos - 1
end end
-- That's DEL elseif key == "Delete" then
elseif key:byte() == 127 then
command = command:sub(1, cur_pos - 1) .. command:sub(cur_pos + 1) command = command:sub(1, cur_pos - 1) .. command:sub(cur_pos + 1)
elseif key == "Left" then elseif key == "Left" then
cur_pos = cur_pos - 1 cur_pos = cur_pos - 1