From a3f911cf95cd0e1b54ea5a7f4f9a342e144bc480 Mon Sep 17 00:00:00 2001 From: immerrr Date: Tue, 31 Aug 2010 13:48:59 +0200 Subject: [PATCH] awful.prompt: insert selection at cursor position Signed-off-by: immerrr Signed-off-by: Julien Danjou --- lib/awful/prompt.lua.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/awful/prompt.lua.in b/lib/awful/prompt.lua.in index f97665f8..2275e6d1 100644 --- a/lib/awful/prompt.lua.in +++ b/lib/awful/prompt.lua.in @@ -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