Move /os into /privacy os

Related to https://github.com/profanity-im/profanity/issues/1836
This commit is contained in:
Michael Vetter
2023-07-25 11:22:42 +02:00
parent feba4b8263
commit f7cce4c5c1
6 changed files with 25 additions and 34 deletions

View File

@@ -1075,6 +1075,7 @@ cmd_ac_init(void)
privacy_ac = autocomplete_new();
autocomplete_add(privacy_ac, "logging");
autocomplete_add(privacy_ac, "os");
privacy_log_ac = autocomplete_new();
autocomplete_add(privacy_log_ac, "on");
@@ -2031,7 +2032,7 @@ _cmd_ac_complete_params(ProfWin* window, const char* const input, gboolean previ
// autocomplete boolean settings
gchar* boolean_choices[] = { "/beep", "/states", "/outtype", "/flash", "/splash",
"/history", "/vercheck", "/privileges", "/wrap",
"/carbons", "/os", "/slashguard", "/mam", "/silence" };
"/carbons", "/slashguard", "/mam", "/silence" };
for (int i = 0; i < ARRAY_SIZE(boolean_choices); i++) {
result = autocomplete_param_with_func(input, boolean_choices[i], prefs_autocomplete_boolean_choice, previous, NULL);
@@ -4239,6 +4240,11 @@ _privacy_autocomplete(ProfWin* window, const char* const input, gboolean previou
return found;
}
found = autocomplete_param_with_func(input, "/privacy os", prefs_autocomplete_boolean_choice, previous, NULL);
if (found) {
return found;
}
return found;
}