From 89700eeebe89d1bb9aa42211ddff028c0f7080db Mon Sep 17 00:00:00 2001 From: Nathan Weizenbaum Date: Tue, 23 Sep 2008 21:14:30 -0700 Subject: [PATCH] awful: shift+tab cycles backwards through prompts Signed-off-by: Nathan Weizenbaum Signed-off-by: Julien Danjou --- lib/awful.lua.in | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/awful.lua.in b/lib/awful.lua.in index a8a1e8f76..9b4e76795 100644 --- a/lib/awful.lua.in +++ b/lib/awful.lua.in @@ -1216,8 +1216,17 @@ function prompt.run(args, textbox, exe_callback, completion_callback, history_pa else if completion_callback then -- That's tab - if key:byte() == 9 then - if ncomp == 1 then + if key:byte() == 9 or key == "ISO_Left_Tab" then + if key == "ISO_Left_Tab" then + if ncomp == 1 then return true end + if ncomp == 2 then + command = command_before_comp + textbox.text = prettyprompt .. prompt_text_with_cursor(command_before_comp, inv_col, cur_col, cur_pos) + return true + end + + ncomp = ncomp - 2 + elseif ncomp == 1 then command_before_comp = command cur_pos_before_comp = cur_pos end