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 03e0ee53d2
commit a3f911cf95
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 if n then
selection = selection:sub(1, n - 1) selection = selection:sub(1, n - 1)
end end
command = command .. selection command = command:sub(1, cur_pos - 1) .. selection .. command:sub(cur_pos)
cur_pos = cur_pos + #selection cur_pos = cur_pos + #selection
end end
elseif key == "Home" then elseif key == "Home" then