1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Merge pull request #1658 from paulfertser/use-editor-env-variable

Use EDITOR environment variable
This commit is contained in:
Michael Vetter 2022-03-27 21:09:27 +02:00 committed by GitHub
commit d662c1b82e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2277,8 +2277,10 @@ _get_default_string(preference_t pref)
return "xdg-open";
case PREF_URL_OPEN_CMD:
return "xdg-open %u";
case PREF_COMPOSE_EDITOR:
return "vim";
case PREF_COMPOSE_EDITOR: {
gchar* editor = getenv("EDITOR");
return editor ? editor : "vim";
}
case PREF_URL_SAVE_CMD:
return NULL; // Default to built-in method.
default: