mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Improve /msg and /win autocompletion
Let /win and /msg both autocomplete roster nickname and actual barejid
This commit is contained in:
parent
528acfb716
commit
65aff65596
@ -1836,6 +1836,11 @@ _cmd_ac_complete_params(ProfWin* window, const char* const input, gboolean previ
|
|||||||
free(unquoted);
|
free(unquoted);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
result = autocomplete_param_with_func(unquoted, contact_choices[i], roster_barejid_autocomplete, previous, NULL);
|
||||||
|
if (result) {
|
||||||
|
free(unquoted);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
free(unquoted);
|
free(unquoted);
|
||||||
|
|
||||||
@ -3668,7 +3673,16 @@ _console_autocomplete(ProfWin* window, const char* const input, gboolean previou
|
|||||||
static char*
|
static char*
|
||||||
_win_autocomplete(ProfWin* window, const char* const input, gboolean previous)
|
_win_autocomplete(ProfWin* window, const char* const input, gboolean previous)
|
||||||
{
|
{
|
||||||
return autocomplete_param_with_func(input, "/win", win_autocomplete, previous, NULL);
|
char* result = autocomplete_param_with_func(input, "/win", win_autocomplete, previous, NULL);
|
||||||
|
|
||||||
|
if (result) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
char* unquoted = strip_arg_quotes(input);
|
||||||
|
result = autocomplete_param_with_func(unquoted, "/win", roster_contact_autocomplete, previous, NULL);
|
||||||
|
free(unquoted);
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char*
|
static char*
|
||||||
|
Loading…
Reference in New Issue
Block a user