From e5d4ff6147f98bade75c0e853444adb98a934ddc 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 f97665f88..2275e6d19 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