awful.prompt: insert selection at cursor position

Signed-off-by: immerrr <immerrr@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
immerrr 2010-08-31 13:48:59 +02:00 committed by Julien Danjou
parent 36b639801b
commit e5d4ff6147
1 changed files with 1 additions and 1 deletions

View File

@ -286,7 +286,7 @@ function run(args, textbox, exe_callback, completion_callback, history_path, his
if n then
selection = selection:sub(1, n - 1)
end
command = command .. selection
command = command:sub(1, cur_pos - 1) .. selection .. command:sub(cur_pos)
cur_pos = cur_pos + #selection
end
elseif key == "Home" then