Make it possible to reset editor to default
All the other commands (avatar, vcard_photo, urlsave, urlopen) have the ability to reset to default already.
This commit is contained in:
@@ -2541,6 +2541,7 @@ static const struct cmd_t command_defs[] = {
|
|||||||
"/executable urlsave set <cmdtemplate>",
|
"/executable urlsave set <cmdtemplate>",
|
||||||
"/executable urlsave default",
|
"/executable urlsave default",
|
||||||
"/executable editor set <cmdtemplate>",
|
"/executable editor set <cmdtemplate>",
|
||||||
|
"/executable editor default",
|
||||||
"/executable vcard_photo set <cmdtemplate>",
|
"/executable vcard_photo set <cmdtemplate>",
|
||||||
"/executable vcard_photo default")
|
"/executable vcard_photo default")
|
||||||
CMD_DESC(
|
CMD_DESC(
|
||||||
@@ -2553,6 +2554,7 @@ static const struct cmd_t command_defs[] = {
|
|||||||
{ "urlsave set", "Set executable that is run by /url save. Takes a command template that replaces %u and %p with the URL and path respectively." },
|
{ "urlsave set", "Set executable that is run by /url save. Takes a command template that replaces %u and %p with the URL and path respectively." },
|
||||||
{ "urlsave default", "Use the built-in download method for saving." },
|
{ "urlsave default", "Use the built-in download method for saving." },
|
||||||
{ "editor set", "Set editor to be used with /editor. Needs a terminal editor or a script to run a graphical editor." },
|
{ "editor set", "Set editor to be used with /editor. Needs a terminal editor or a script to run a graphical editor." },
|
||||||
|
{ "editor default", "Restore to default settings." },
|
||||||
{ "vcard_photo set", "Set executable that is run by /vcard photo open. Takes a command template that replaces %p with the path" },
|
{ "vcard_photo set", "Set executable that is run by /vcard photo open. Takes a command template that replaces %p with the path" },
|
||||||
{ "vcard_photo default", "Restore to default settings." })
|
{ "vcard_photo default", "Restore to default settings." })
|
||||||
CMD_EXAMPLES(
|
CMD_EXAMPLES(
|
||||||
|
|||||||
@@ -9688,6 +9688,9 @@ cmd_executable_editor(ProfWin* window, const char* const command, gchar** args)
|
|||||||
if (g_strcmp0(args[1], "set") == 0 && num_args >= 3) {
|
if (g_strcmp0(args[1], "set") == 0 && num_args >= 3) {
|
||||||
prefs_set_string(PREF_COMPOSE_EDITOR, args[2]);
|
prefs_set_string(PREF_COMPOSE_EDITOR, args[2]);
|
||||||
cons_show("`editor` command set to invoke '%s'", args[2]);
|
cons_show("`editor` command set to invoke '%s'", args[2]);
|
||||||
|
} else if (g_strcmp0(args[1], "default") == 0) {
|
||||||
|
prefs_set_string(PREF_COMPOSE_EDITOR, NULL);
|
||||||
|
cons_show("`editor` will use built-in download method (default)");
|
||||||
} else {
|
} else {
|
||||||
cons_bad_cmd_usage(command);
|
cons_bad_cmd_usage(command);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user