diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2021-05-30 22:35:17 +0200 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2021-05-30 23:14:05 +0200 |
commit | a5a0dd6c919a2b4f12ef2b4f57a0d9a2a9cabf34 (patch) | |
tree | b1ec0684d776abb798f644eb04b2c5a1797ad107 /src/command | |
parent | 69e3cebf26dc5c6a9c13fe3269bcd659060d7c4e (diff) | |
download | profani-tty-a5a0dd6c919a2b4f12ef2b4f57a0d9a2a9cabf34.tar.gz |
external editor: don't use absolute paths and allow path search
Diffstat (limited to 'src/command')
-rw-r--r-- | src/command/cmd_funcs.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index b2262c5f..a56f0cfc 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -9418,15 +9418,11 @@ cmd_editor(ProfWin* window, const char* const command, gchar** args) g_object_unref(fos); char* editor = prefs_get_string(PREF_COMPOSE_EDITOR); - if (!g_file_test(editor, G_FILE_TEST_EXISTS)) { - cons_show_error("Editor: binary %s not exist", editor); - return TRUE; - } // Fork / exec pid_t pid = fork(); if (pid == 0) { - int x = execl(editor, editor, g_file_get_path(file), (char*)NULL); + int x = execlp(editor, editor, g_file_get_path(file), (char*)NULL); if (x == -1) { cons_show_error("Editor:Failed to exec %s", editor); } |