awful: shift+tab cycles backwards through prompts
Signed-off-by: Nathan Weizenbaum <nex342@gmail.com> Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
0359bb4e4e
commit
89700eeebe
|
@ -1216,8 +1216,17 @@ function prompt.run(args, textbox, exe_callback, completion_callback, history_pa
|
||||||
else
|
else
|
||||||
if completion_callback then
|
if completion_callback then
|
||||||
-- That's tab
|
-- That's tab
|
||||||
if key:byte() == 9 then
|
if key:byte() == 9 or key == "ISO_Left_Tab" then
|
||||||
if ncomp == 1 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
|
command_before_comp = command
|
||||||
cur_pos_before_comp = cur_pos
|
cur_pos_before_comp = cur_pos
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue