awful: init index history at run

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-08-11 22:42:48 +02:00
parent 17900df7db
commit f9954cd6af
1 changed files with 1 additions and 3 deletions

View File

@ -774,7 +774,6 @@ local function prompt_history_load()
end end
end end
end end
prompt.history.data.index = #prompt.history.data.table + 1
end end
end end
@ -823,8 +822,6 @@ local function prompt_history_add(command)
-- Save table content in file, not very optimized atm... -- Save table content in file, not very optimized atm...
prompt_history_save() prompt_history_save()
end end
prompt.history.data.index = #prompt.history.data.table + 1
end end
end end
@ -933,6 +930,7 @@ function prompt.run(args, textbox, exe_callback, completion_callback)
return return
end end
textbox.text = prettyprompt .. prompt_text_with_cursor(text, inv_col, cur_col, cur_pos) textbox.text = prettyprompt .. prompt_text_with_cursor(text, inv_col, cur_col, cur_pos)
prompt.history.data.index = #prompt.history.data.table + 1
capi.keygrabber.run( capi.keygrabber.run(
function (mod, key) function (mod, key)
local has_ctrl = false local has_ctrl = false