From 923af3ba38361b620066741bc8fa6b08cd3e9325 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Tue, 22 Mar 2022 12:58:39 +0100 Subject: Reset url autocompletion after open/save I guess we should reset the position after we ran `/url open|save`. So that next time `/url open ` starts with the latest entry. Fix https://github.com/profanity-im/profanity/issues/1654 --- src/command/cmd_funcs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index b1aadbf0..d20167c9 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -9292,6 +9292,8 @@ cmd_url_open(ProfWin* window, const char* const command, gchar** args) _url_external_method(cmd_template, url, NULL); out: + // reset autocompletion to start from latest url and not where we left of + autocomplete_reset(window->urls_ac); free(cmd_template); free(filename); @@ -9348,6 +9350,8 @@ cmd_url_save(ProfWin* window, const char* const command, gchar** args) } out: + // reset autocompletion to start from latest url and not where we left of + autocomplete_reset(window->urls_ac); free(filename); free(cmd_template); -- cgit 1.4.1-2-gfad0